/RustyParrot

A discord bot written in Rust by using the libraries Serenity and Songbird

Primary LanguageRustMIT LicenseMIT

Rusty-Parrot_logo.png

RustyParrot Discord Bot

label-badge rust-version

Introduction

A Rust discord bot made with Serenity and Songbird.

Features

  • Plays music using yt-dlp
    • Plays from urls

Installation

  1. Install Rust: Install Rust's tools from its official website

  2. Git Clone: Clone the repository to your local machine:

    git clone https://github.com/math-queiroz/rusty-parrot.git
    
  3. Environment: Rename the .env.template file to .env

  4. Dependencies: Install the required project dependencies by running:

    cargo build --release
    
  5. Bot Token: If you haven't done so, head on to the Discord Developer Portal to create an application and retrieve a bot token. Then add it to a .env file in your project's root directory. Make sure the file follow the correct naming and key pair format, e.g.:

    DISCORD_TOKEN=YOUR_BOT_TOKEN_HERE
    
  6. (Optional) Testing Guild: Set a testing guild id in .env file for instantly testing changes in slash command interactions.

    TEST_GUILD_ID=YOUR_TESTING_GUILD_ID_HERE
    
  7. Bot Invite Link: Generate an invite link for your bot by going to the OAuth2 section in the Discord Developer Portal. Make sure to select the bot and applications.commands scopes and the permissions your bot needs.

  8. Run the Bot: Run it with the following command:

    cargo run --release
    

🎉 Congrats! Your bot should now be all up and running...

Usage

To use the bot in your Discord server, use the invite link you generated in step 5. Once it's in your server, you can interact with it.

Crates

  • dotenv v0.15.0
  • tokio v1.33.0
  • serenity v0.12
  • songbird v0.4
  • symphonia v0.5.2
  • reqwest 0.11

Dependencies

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Serenity - A Rust library for the Discord API.
  • Songbird - A library for Discord audio functionality.