Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class CMDEvents(commands.Cog):
- def __init__(self, bot):
- self.Bot = bot
- @commands.Cog.listener()
- async def on_ready(self):
- print("[Debug] Начинаю загрузку данных...")
- for command in collcustomcommands.find():
- async def custom_command(ctx):
- if command['text'] == 'null':
- await ctx.reply("`[Error] Данная команда не настроена, используйте /commandsettings`")
- else:
- if command['command_type'] == 1:
- await ctx.send(command['text'])
- else:
- pass
- self.Bot.add_command(commands.Command(name=command['name'], callback = custom_command))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement