Releases: kkrypt0nn/Python-Discord-Bot-Template
Releases · kkrypt0nn/Python-Discord-Bot-Template
Version 4.0
- Now using
disnake - Added a command that uses buttons (coinflip)
- Added a command that uses selection dropdown (rps)
- Every command is now in slash command and normal command (old way with prefix)
- Make sure to enable the message intents for normal commands as it's now a privileged intent.
- The slash command is above, the normal command is below
Version 3.1.1
- Fixed
TypeError: 'NoneType' object is not iterablefor prefix -> Python 3.10
Version 3.1
Changes:
- Added a
@checks.is_ownercheck which raises aUserNotOwnerexception - Added a
@checks.not_blacklistedcheck which raises aUserBlacklistedexception - Using checks instead of same code for every command
- Various code cleanup
What's new is mostly the ability to use checks instead of code for checking if, for example, the user trying to execute the command is not an owner.
Before: (Blacklist check, had to be copied on every command)
@cog_ext.cog_slash(
name="ping",
description="Check if the bot is alive.",
)
async def ping(self, context: SlashContext):
with open("blacklist.json") as file:
blacklist = json.load(file)
if context.author.id in blacklist["ids"]:
return
# Rest of the codeNow:
@cog_ext.cog_slash(
name="ping",
description="Check if the bot is alive.",
)
@checks.not_blacklisted() # Here is the difference
async def ping(self, context: SlashContext):
# Rest of the codeVersion 3.0
Now using slash commands
Version 2.8
- Blacklisted users are now saved in the file
- Moved config file to JSON
- Moved the blacklist in a separate file (
blacklist.json) - The colors are no longer saved in the config file
Version 2.7
- Added a check for
commands.MissingRequiredArgumentin the error handler - Added a disclaimer section in the README file
- Added the latency of the bot in the
pingcommand - Created the TODO list file
- Fixed some error embeds having success (green) colors
- Removed an unnecessary
self.bot.logout()statement - Removed the
dickcommand, as I want to keep this template safe for work - Renamed the names of the arguments in some commands
- The bot now tries to send an embed in the private message of the command author for the
inviteandservercommands, if this was not successful it will be sent in the channel
Version 2.6
- Added new
dailyfactcommand that gives a random fact every day, using cool down - Fixed some typos in README.md
- Remade the
on_command_errorevent forCommandOnCooldown
Version 2.5
- Code reformat
- Rewrote the status task
- Now using the
has_permissionsdecorator for user permissions - Using
.yamlinstead of.pyfile for config
Version 2.4.3
- Fixed intents for
serverinfocommand
Version 2.4.2
- Blacklisted users are being ignored when executing a command