1
0
Fork 0
mirror of synced 2024-05-18 19:42:28 +12:00

Ensure settings is an empty dictionary by default

This commit is contained in:
Phxntxm 2017-07-30 20:12:36 -05:00
parent a8d6c0ff31
commit d0cacd7334

View file

@ -161,7 +161,7 @@ class Interaction:
user = ctx.message.author
# Lets get the settings
settings = self.bot.db.load('server_settings', key=ctx.message.guild.id)
settings = self.bot.db.load('server_settings', key=ctx.message.guild.id) or {}
# Get the custom messages we can use
custom_msgs = settings.get('hugs')
# if they exist, then we want to see if we want to use default as well
@ -238,7 +238,7 @@ class Interaction:
battleP2 = ctx.message.author
# Lets get the settings
settings = self.bot.db.load('server_settings', key=ctx.message.guild.id)
settings = self.bot.db.load('server_settings', key=ctx.message.guild.id) or {}
# Get the custom messages we can use
custom_msgs = settings.get('battles')
# if they exist, then we want to see if we want to use default as well