speak_bot 1.0.0

Run a Discord bot that responds to mentions
speak_bot-1.0.0 is not a library.


CI Crates.io License

Simple program to run a Discord bot that responds to mentions with a randomly-selected quote from a text file.


Download the binary from GitHub or install via cargo install speak_bot.


You'll need 3 things:

  1. This bot
  2. A Discord bot token
  3. A text file with quotes

To set up a Discord bot, head to discord.com/developers/applications, create an application, click on "Bot" on the left nav, and then the "Add Bot" button. Now, there will be a lot more information on the page, and a "Copy" button next to the icon. Click that, and that's your bot's token - you'll need this token when running this program. You'll also need to invite the bot to your server (or a server on which you are an admin) by clicking on the "Oauth" item on the left nav, selecting "bot" in the area with all the checkboxes, and then copying the URL into your browser and confirming the addition.

For the quotes, create a text file with one quote per line.

Once you have these items, run the bot with:

./speak_bot <path/to/quotes.txt> -t <token>


./speak_bot <path/to/quotes.txt>

if you have your Discord bot token in an environment variable called "DISCORD_TOKEN". This may be more useful for you, as you can configure your terminal to have that variable instead of having to remember it whenever you start the bot.

To run the bot in the background, you can look into your OS's capabilities to run programs in the background. For Linux systems, systemd is a popular choice.

When the bot is running, it will respond with a random quote from the quotes file whenever mentioned (like with @).




  • Git
  • A recent version of Rust


git clone https://github.com/Celeo/speak_bot
cd speak_bot
cargo build


Licensed under either of


Please feel free to contribute. Please open an issue first (or comment on an existing one) so that I know that you want to add/change something.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.