Skip to content
This repository has been archived by the owner on Jun 9, 2022. It is now read-only.
/ DidIAsk-rs Public archive

Did I ask, rewritten in Rust using serenity-rs

Notifications You must be signed in to change notification settings

captainrex493/DidIAsk-rs

Repository files navigation

DidIAsk-rs

Did I ask, rewritten in Rust using serenity-rs.

This bot randomly comments "Did I ask?" on specified channels (along with other goodies).

Building and Configuring:

  1. Clone this repository

  2. Install Rust and Cargo. Don't Know How?

  3. Sign into Discord and get the bot registered. Note down the bot token and take care of it. Also set the permissions to send messages and read message history. Don't Know How?

  4. Using Discord, find out the channel ID you want the bot to run on. Don't know how?

  5. From the source directory, run cargo build --release to generate the binary. (If you want debug features, get rid of the --release flag)

  6. Copy the generated binary (should be in the directory target/release/DidIAsk to a different (preferably empty) directory.

  7. In the new directory, create a file called .env and place the following code inside of it, replacing the values needed or copy the .env.example file and rename it and replace the values needed.

DISCORD_TOKEN=YOUR_DISCORD_TOKEN # You got this earlier
PREFIX=! # What all commands start with
RUST_LOG=error # The options are info, error, or debug

CHANNEL_WHITELIST=519875138979834798,489023098423098423,705895622074433549 # Channel ids that the bot is allowed to randomly did i ask
GULAG_ROLE=705895621961187710 # Id a disciplinary role
STATUS_PREFIX=listening # Prefix of the bot status, either playing or listening
STATUS_PHRASE=-h # Status of the bot

Docker

Download the provided docker-compose.yml file, and open it with your preferred text editor. Set the bot prefix to a character (default is ?), and set the bot token. Don't know how to get a token? Don't forget to set the rest of the configuration outlined above.

Install Docker Compose by following the instructions here.

Start the bot with docker-compose up -d, and check to make sure that it's running with docker ps. If it isn't running, run docker-compose up to see debug output, and ensure that you've set all of the proper information in the docker-compose.yml file.

Invite your bot to the server(s) of your choice. Don't know how?.

Commands:

  1. Core:
    1. dia: Bot comments a stylized "Did I ask?"
  2. Emojis / Emoticons:
    1. uwu: Bot comments a "uwu" kaomoji.
    2. owo: Bot comments a "owo" kaomoji.
    3. smile: Bot comments a random smiling kaomoji.
    4. hug: Bot comments a random hugging kaomoji.
    5. flex: Bot comments a random flexing kaomoji.
    6. animal: Bot comments a random animal kaomoji.
    7. surprise: Bot comments a random suprised kaomoji.
    8. dance: Bot comments a random dancing kaomoji.
    9. shrug: Bot comments a random shrugging kaomoji.
    10. flip: Bot comments a random "table flip" kaomoji.
    11. unflip: Bot comments a random "table unflip" kaomoji.
    12. sus: Bot comments a random suspicious kaomoji.
    13. cri: Bot comments a random crying kaomoji.
    14. yike: Bot comments a random "yikes" kaomoji.
    15. bear: Bot comments a random bear kaomoji / emoji.
    16. fight: Bot comments a random fighting kaomoji.
  3. Math:
    1. multiply: Bot multiplies two given numbers.
  4. Administration (only owner is allowed to run):
    1. quit: Bot quits.
    2. Gulag: Bot adds user to Gulag role specified in configuration.
  5. Misc
    1. ping: Pong!

About

Did I ask, rewritten in Rust using serenity-rs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •