Skip to content
This repository was archived by the owner on Oct 18, 2020. It is now read-only.

Commit 5fad20a

Browse files
committed
add dev cogs
1 parent 318e1bc commit 5fad20a

File tree

4 files changed

+545
-2
lines changed

4 files changed

+545
-2
lines changed

bot.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,14 @@
2525
if debug_mode == True: logging.basicConfig(level=logging.DEBUG)
2626

2727
#### Infos
28-
version = "5.11"
28+
version = "5.12"
2929
author = "Wonderfall"
3030
name = "A.T.O.S."
3131

32+
### Cogs
33+
initial_extensions = ['cogs.dev_commands']
34+
35+
3236
### Init things
3337
bot = commands.Bot(command_prefix=commands.when_mentioned_or(bot_prefix)) # Set prefix for commands
3438
bot.remove_command('help') # Remove default help command to set our own
@@ -1638,18 +1642,25 @@ async def send_desync_help(ctx):
16381642
### On command error : invoker has not enough permissions
16391643
@bot.event
16401644
async def on_command_error(ctx, error):
1641-
if isinstance(error, (commands.CheckFailure, commands.MissingRole)):
1645+
if isinstance(error, (commands.CheckFailure, commands.MissingRole, commands.NotOwner)):
16421646
await ctx.message.add_reaction("🚫")
16431647
elif isinstance(error, (commands.MissingRequiredArgument, commands.ArgumentParsingError, commands.BadArgument)):
16441648
await ctx.message.add_reaction("💿")
16451649
elif isinstance(error, commands.CommandOnCooldown):
16461650
await ctx.message.add_reaction("❄️")
16471651
elif isinstance(error, commands.CommandNotFound):
16481652
await ctx.message.add_reaction("❔")
1653+
elif isinstance(error, commands.CommandInvokeError):
1654+
await ctx.message.add_reaction("⚠️")
16491655

16501656

16511657
#### Scheduler
16521658
scheduler.start()
16531659

1660+
### Add base cogs
1661+
if __name__ == '__main__':
1662+
for extension in initial_extensions:
1663+
bot.load_extension(extension)
1664+
16541665
#### Lancement du bot
16551666
bot.run(bot_secret, bot = True, reconnect = True)

cogs/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)