Discord bot randomizer. Users can create a list that is stored in MongoDB and the bot can select a random item from this list.
Go to file
Jiri Karlik be4ac63db7 Transfer to Gitea 2024-08-10 09:10:28 +02:00
images Transfer to Gitea 2024-08-10 09:10:28 +02:00
.gitignore Transfer to Gitea 2024-08-10 09:10:28 +02:00
LICENSE.txt Transfer to Gitea 2024-08-10 09:10:28 +02:00
README.md Transfer to Gitea 2024-08-10 09:10:28 +02:00
commands.py Transfer to Gitea 2024-08-10 09:10:28 +02:00
messages.py Transfer to Gitea 2024-08-10 09:10:28 +02:00
randbot.py Transfer to Gitea 2024-08-10 09:10:28 +02:00
requirements.txt Transfer to Gitea 2024-08-10 09:10:28 +02:00
tokens.py Transfer to Gitea 2024-08-10 09:10:28 +02:00

README.md

Contributors Forks Stargazers Issues MIT License LinkedIn


Logo

RandBot

PROJECT DISCONTINUED due to lack of interest

Discord bot randomizer. Users can create a list that is stored in MongoDB and the bot can select a random item from this list. · Report Bug · Request Feature

Table of Contents

  1. About The Project
  2. Getting Started
  3. Bot Commands
  4. Roadmap
  5. Contributing
  6. License
  7. Contact

About The Project

Discord bot created in Python using discord.py. The bot can create custom lists using the ?list command and stores those lists in MongoDB. Those lists can also be deleted using the command ?delete. Bot returns 1 random item from the selected list when command ?random is used.

The project is now in the beta version. This is the first working version that I am using on my Discord server to randomize drop location in Call of Duty: Warzone. It is currently working, but error handling should be updated and new features can be added. This was a fun project to use on my Discord, but I have decided to share it with others. I am currently hosting the bot as well, so you can also invite the bot to your server instead of running it on your own.

Built With

Getting Started

Download the repository and create the MongoDB Atlas database. More details in the Installation section.

Prerequisites

  • Python 3
  • Following Python modules are needed. I recommend installing them with pip:
  • MongoDB Atlas - There is free database option. I am currently using following DB structure "bot.lists", which is also part of the code in commands.py. It can be changed there:
    db = clientDB.bot
    collection = db.lists
    

Installation

  1. Clone the repo
    git clone https://github.com/karlji/RandBot-Discord-Randomizer.git
    
  2. Create Discord bot on Discord Developer Portal & store the bot token to tokens.py
    • Logo
  3. Create MongoDB Atlas cluster with DB structure "bot.lists", Document structure visible below, add IP adress of your bot machine, copy "connection string" to tokens.py
    • Logo
    • Logo
  4. Run randbot.py
  5. Create OAuth2 link on Discord Developer Portal. Options "bot" and "send messages" should be enough. This link can be used to invite bot to Discord servers.
    • Logo

Commands

Following commands are available:

  • ?commands
    • Lists all available commands.
  • ?list {ListName}
    • Creates new list.
  • ?shuffle {ListName}
    • Randomly selects one item from list.
  • ?delete {ListName}
    • Deletes existing list.
  • ?showlists
    • Shows existing lists.
  • ?yesno
    • Randomly answers Yes/No.
  • ?8ball
    • Answers like The Magic 8 Ball.

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

Contributions are what makes the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Jiri Karlik- Linkedin

Project Link: https://github.com/karlji/RandBot-Discord-Randomizer