Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

The main bot for the r/unixporn discord server!

License

NotificationsYou must be signed in to change notification settings

unixporn/robbb

Repository files navigation

A Discord bot for the Unixporn community

Now written in agood 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 file.you can useexport $(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 usethis script to generate the role & channel variables froma template server

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, usesqlx-cli to add migrations and generate a new, updated database file.


[8]ページ先頭

©2009-2025 Movatter.jp