|
|
@ -346,6 +346,8 @@ async def on_command_error(ctx, args2):
|
|
|
|
await on_command_permission(ctx)
|
|
|
|
await on_command_permission(ctx)
|
|
|
|
elif isinstance(args2, commands.BotMissingPermissions):
|
|
|
|
elif isinstance(args2, commands.BotMissingPermissions):
|
|
|
|
await on_bot_forbidden(ctx, args2)
|
|
|
|
await on_bot_forbidden(ctx, args2)
|
|
|
|
|
|
|
|
elif isinstance(args2, commands.NotOwner):
|
|
|
|
|
|
|
|
await on_not_owner(ctx)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Async def for handling command bad argument error
|
|
|
|
# Async def for handling command bad argument error
|
|
|
@ -400,6 +402,13 @@ async def on_command_missing_argument(ctx):
|
|
|
|
await ctx.send(embed=embed)
|
|
|
|
await ctx.send(embed=embed)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Async def for handling permission errors
|
|
|
|
|
|
|
|
async def on_not_owner(ctx):
|
|
|
|
|
|
|
|
# Send an error message to the user saying that they don't have permission to use this command
|
|
|
|
|
|
|
|
embed = Embed(description="**❌ Owner Only Command ❌**")
|
|
|
|
|
|
|
|
await ctx.send(embed=embed)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Run the bot, allowing it to come online
|
|
|
|
# Run the bot, allowing it to come online
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
client.run(API_TOKEN)
|
|
|
|
client.run(API_TOKEN)
|
|
|
|