nonexistent commands wont raise exception anymore; suggestionChannel is added in serverconfig
This commit is contained in:
parent
5dcec89eff
commit
a4ae8fd6b8
9
akuma.py
9
akuma.py
@ -1,5 +1,6 @@
|
||||
import json, discord
|
||||
from discord.ext import commands
|
||||
from discord.ext.commands import CommandNotFound
|
||||
|
||||
#config files
|
||||
cFile = "settings.json"
|
||||
@ -26,7 +27,7 @@ async def on_ready():
|
||||
|
||||
@bot.event
|
||||
async def on_guild_join(guild):
|
||||
s[str(guild.id)] = {"adminRole": "", "modRole": "", "joinMessage" : "", "suggestionChannel": 0, "modChannel": 0}
|
||||
s[str(guild.id)] = {"adminRole": "", "modRole": "", "joinMessage" : "", "suggestionChannel": 0, "modChannel": 0, "announcementChannel": 0}
|
||||
writeServer(s)
|
||||
|
||||
@bot.event
|
||||
@ -34,6 +35,12 @@ async def on_guild_remove(guild):
|
||||
del s[str(guild.id)]
|
||||
writeServer(s)
|
||||
|
||||
@bot.event
|
||||
async def on_command_error(ctx, error):
|
||||
if isinstance(error, CommandNotFound):
|
||||
return
|
||||
raise error
|
||||
|
||||
@bot.command(hidden=True)
|
||||
async def printExt(ctx):
|
||||
"""Prints out every loaded extension"""
|
||||
|
Loading…
x
Reference in New Issue
Block a user