The Discord Raffle Bot is, as the name suggests, a simple python bot for hosting real time raffles for talk shows, communities, livestreams and others. This simple bot allows for flexibility while utilizing just a single command to ensure simplicity for non-tech savvy users.
People experienced in the Python programming language will also be able to easily expand on the bot, add new functionalities and commands thanks to an easy and simple code design that welcomes even the beginners.
This bot utilizes just Python 3.6 (should work on 3.0 and newer, but was tested on 3.6) and the discord.py Python library.
The bot is heavily dependent on the asyncio library (installed by default) which allows Python to act as an asynchronous programming language. This ensures that the bot can be run on multiple discord servers and in multiple channels at once without stopping raffles already taking place and without hosting multiple instances of the bot.
The changes since the last post can be found between the commit 08dfd1a and 9e30b5c.
Just drop the role name into one of those two lists in the config.py file.
The max and min time for the raffle's run time can be defined just as easily.
The messages have also been moved to the config file since they are intended to be editable.
The functions proved to not be very clear and hardly readable. Their usage was also questionable at times, as some functionality could've been moved to other functions for clarity and/or performance reasons.
This also allows for more than 1 instance of a raffle to run at once!
I was advised to do this by the moderator checking my post last time, so I looked into it and adjusted my code to make it clearer and follow those rules.
The code now follows the 80 char limit and switched from tabs to spaces.
Due to the addition of config.py, the instructions for setup changed slightly (for better!).
The project is finished aside from final polish and addition of good suggestions. It will also remain maintained for bugs if any are found.
If you wish to contribute to this project, please use the Github Issues or create Pull Requests directly. You can also contact me via comments under this post.
Special thanks to @mys and
@emrebeyler for great feedback!