Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/unixporn/robbb
The main bot for the r/unixporn discord server!
https://github.com/unixporn/robbb
discord discord-bot hacktoberfest
Last synced: about 15 hours ago
JSON representation
The main bot for the r/unixporn discord server!
- Host: GitHub
- URL: https://github.com/unixporn/robbb
- Owner: unixporn
- License: mit
- Created: 2021-02-28T19:01:11.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2025-01-19T09:10:50.000Z (4 days ago)
- Last Synced: 2025-01-19T10:19:47.030Z (4 days ago)
- Topics: discord, discord-bot, hacktoberfest
- Language: Rust
- Homepage:
- Size: 1.32 MB
- Stars: 133
- Watchers: 3
- Forks: 19
- Open Issues: 41
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Say hi to Robbb!
**A Discord bot for the Unixporn community**
Now written in a _good_ language!
## Dependencies
- Rust
- sqlx-cli (if you need to change the database schema)## Set up environment variables
The bot reads the data it needs from environment variables.
To see which values have to be set, check out the provided [.env.example](./.env.example) file.
you can use `export $(cat .env)` to export the variables from a .env file in your current environment.### Extra information
Most environment variables are retrieved by right clicking, and copying the ID of the relevant channel, category, role.
You need to have developer mode turned on for that to be possible.- TOKEN: The discord bot token, retrieved from: https://discord.com/developers/applications
- GUILD: The ID of the guild, where the host resides
- ROLE\_\*: IDs of relevant roles, easily copied from Server Settings -> Roles.
- ROLE\_COLOR: Unlike other ROLE variables, this is a comma (`,`) separated list, ex.: `ROLES_COLOR=825158129711972372,635627141123538966`
- CHANNEL\_\*: Channel IDs, based on which the bot performs moderation or responses
- ATTACHMENT\_CACHE\_\*: Location (directory) and size of local message attachments cache (in case they get deleted)Additionally, you can use [this script](gen-env.sh) to generate the role & channel variables from [a template server](https://discord.new/zkhTrUTEbtg9)
## Database
The bot uses a SQLite database, which does not have to be started externally.
The included sqlite-db file is not the actual database used in production, but just an empty database used for development.
To change and work with the database, use [sqlx-cli](https://github.com/launchbadge/sqlx/tree/master/sqlx-cli) to add migrations and generate a new, updated database file.