Releases: kkrypt0nn/Python-Discord-Bot-Template
Releases · kkrypt0nn/Python-Discord-Bot-Template
Version 3.1.1
- Fixed
TypeError: 'NoneType' object is not iterable
for prefix -> Python 3.10
Version 3.1
Changes:
- Added a
@checks.is_owner
check which raises aUserNotOwner
exception - Added a
@checks.not_blacklisted
check which raises aUserBlacklisted
exception - 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 code
Now:
@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 code
Version 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.MissingRequiredArgument
in the error handler - Added a disclaimer section in the README file
- Added the latency of the bot in the
ping
command - Created the TODO list file
- Fixed some error embeds having success (green) colors
- Removed an unnecessary
self.bot.logout()
statement - Removed the
dick
command, 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
invite
andserver
commands, if this was not successful it will be sent in the channel
Version 2.6
- Added new
dailyfact
command that gives a random fact every day, using cool down - Fixed some typos in README.md
- Remade the
on_command_error
event forCommandOnCooldown
Version 2.5
- Code reformat
- Rewrote the status task
- Now using the
has_permissions
decorator for user permissions - Using
.yaml
instead of.py
file for config
Version 2.4.3
- Fixed intents for
serverinfo
command
Version 2.4.2
- Blacklisted users are being ignored when executing a command
Version 2.4.1
- Added config import to moderation cog