rustbot

所属分类:自然语言处理
开发工具:Rust
文件大小:170KB
下载次数:0
上传日期:2023-05-15 15:34:26
上 传 者sh-1993
说明:  用于Discord的Rust编程语言bot
(Rust programming language bot for Discord)

文件列表:
.dockerignore (73, 2023-08-01)
.env.example (1158, 2023-08-01)
Cargo.lock (60212, 2023-08-01)
Cargo.toml (1326, 2023-08-01)
Dockerfile (760, 2023-08-01)
LICENSE.TXT (1085, 2023-08-01)
assets (0, 2023-08-01)
assets\OpenSans-LICENSE.txt (11358, 2023-08-01)
assets\OpenSans.ttf (129948, 2023-08-01)
assets\conrad.png (29509, 2023-08-01)
build.rs (608, 2023-08-01)
container-compose.yaml (250, 2023-08-01)
fly.toml (1924, 2023-08-01)
migrations (0, 2023-08-01)
migrations\20210905215844_initial_migration.sql (307, 2023-08-01)
migrations\20210908154708_user_prefixes.sql (108, 2023-08-01)
migrations\20211011165127_godbolt_targets.sql (851, 2023-08-01)
migrations\20221025021107_ub_create.sql (427, 2023-08-01)
sqlx-data.json (4267, 2023-08-01)
src (0, 2023-08-01)
src\crates.rs (6527, 2023-08-01)
src\godbolt (0, 2023-08-01)
src\godbolt\mod.rs (9389, 2023-08-01)
src\godbolt\targets.rs (7487, 2023-08-01)
src\main.rs (15578, 2023-08-01)
src\misc.rs (7334, 2023-08-01)
src\moderation (0, 2023-08-01)
src\moderation\mod.rs (9574, 2023-08-01)
src\moderation\slowmode.rs (6155, 2023-08-01)
src\playground (0, 2023-08-01)
src\playground\api.rs (6685, 2023-08-01)
src\playground\microbench.rs (5194, 2023-08-01)
... ...

# MOVED TO https://github.com/rust-community-discord/ferrisbot-for-discord # Rustbot ## Inviting the bot Some permissions are required: - Send Messages: base command functionality - Manage Roles: for `?rustify` command - Manage Messages: for `?cleanup` command - Add Reactions: for `?rustify` command feedback Furthermore, the `applications.commands` OAuth2 scope is required for slash commands. Here's an invite link to an instance hosted by me on my Raspberry Pi, with the permissions and scopes incorporated: https://discord.com/oauth2/authorize?client_id=804340127433752***6&permissions=268445760&scope=bot%20applications.commands Adjust the client_id in the URL for your own hosted instances of the bot. ## Hosting the bot The bot requires `Server Members Intent` enabled in the `Applications > $YOUR_BOTS_NAME > Bot` settings of Discord's [developer portal](https://discord.com/developers/applications). Run the bot using `cargo run --release`. You will need to provide several environment variables. A convenient way to do this is to copy the `.env.example` file to `.env` and fill out the values. Then run the bot with the `.env` file applied. Also set `SQLX_OFFLINE` to `true` if you're running the bot for the first time. Otherwise, SQLx will try to call into the database to check query correctness, which fails if the database hasn't been set up yet. Example command-line for Linux: `set -a && source .env && set +a && SQLX_OFFLINE=true cargo run --release` ### Docker This project has a Containerfile, so you can use Docker or Podman to run this bot if you wish. For that, rename the `.env.example` file into `.env`, fill out the values, and run the command: ```sh docker-compose -f container-compose.yaml up -d --build ``` Currently we're using Docker to run it, but eventually we'll make it work with just podman. ## Credits This codebase has its roots in [rust-lang/discord-mods-bot](https://github.com/rust-lang/discord-mods-bot/), the Discord bot running on the official Rust server.

近期下载者

相关文件


收藏者