Remove erroneous instance of guild
This commit is contained in:
parent
8386923199
commit
fcc8cc0bbe
2 changed files with 2 additions and 2 deletions
2
bot.py
2
bot.py
|
@ -65,7 +65,7 @@ async def process_command(ctx):
|
|||
command_usage['member_usage'] = total_member_usage
|
||||
|
||||
# Add one to the server's usage for this command
|
||||
if ctx.message.guild is not None:
|
||||
if ctx.message.server is not None:
|
||||
total_server_usage = command_usage.get('server_usage', {})
|
||||
server_usage = total_server_usage.get(server.id, 0) + 1
|
||||
total_server_usage[server.id] = server_usage
|
||||
|
|
|
@ -116,7 +116,7 @@ def command_prefix(bot, message):
|
|||
# But it is not worth a query for every single message the bot detects, to fix
|
||||
try:
|
||||
prefixes = cache['server_settings'].values
|
||||
prefix = [x for x in prefixes if x['server_id'] == message.guild.id][0]['prefix']
|
||||
prefix = [x for x in prefixes if x['server_id'] == message.server.id][0]['prefix']
|
||||
return prefix or default_prefix
|
||||
except (KeyError, TypeError, IndexError, AttributeError):
|
||||
return default_prefix
|
||||
|
|
Loading…
Reference in a new issue