https://github.com/tyzbit/go-discord-amputator
Discord Amputator bot rewritten in Go
https://github.com/tyzbit/go-discord-amputator
bot discord google-amp
Last synced: 5 months ago
JSON representation
Discord Amputator bot rewritten in Go
- Host: GitHub
- URL: https://github.com/tyzbit/go-discord-amputator
- Owner: tyzbit
- License: gpl-3.0
- Created: 2022-03-26T04:21:00.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2026-01-15T14:04:07.000Z (5 months ago)
- Last Synced: 2026-01-24T16:18:19.632Z (5 months ago)
- Topics: bot, discord, google-amp
- Language: Go
- Homepage: https://top.gg/bot/868917305722167336
- Size: 15.4 MB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-discord-amputator
Discord Amputator bot rewritten in Go
## Configuration
Set some environment variables before launching, or add a `.env` file.
If database environment variables are provided, the bot will save stats to an external database.
Otherwise, it will save stats to a local sqlite database at `/var/go-discord-amputator/local.db`
| Variable | Value(s) |
|:-|:-|
| ADMINISTRATOR_IDS | IDs of users allowed to use administrator commands |
| DB_DATABASE | Database name for database
| DB_HOST | Hostname for database |
| DB_PASSWORD | Password for database user |
| DB_USER | Username for database user |
| LOG_LEVEL | `trace`, `debug`, `info`, `warn`, `error` |
| TOKEN | The Discord token the bot should use |
## Usage
Configure the bot with `!amp config [setting] [value]`. The settings are below:
| Setting | Default | Description |
|:-|:-|:-|
| switch | `on` | Enable the bot: `on`, disable the bot: `off` |
| replyto | `off` | Reply to the original message for context, `on` or `off` |
| embed | `on` | Whether to use an embed message or just reply with links (Discord will then auto preview them), `on` or `off` |
| guess | `on` | Whether to guess if the URL is difficult to amputate, `on` or `off` |
| maxdepth | `3` | The maximum number of links deep to go to find the canonical URL, any number |
You can also use `!amp stats` to get amputation stats for your server.
## Development
Create a `.env` file with your configuration, at the bare minimum you need
a Discord token for `TOKEN`. You can either `docker compose up --build` to run
with a mysql database, or just `go run main.go` to run with a sqlite database.