Ensure settings is an empty dictionary by default
This commit is contained in:
parent
a8d6c0ff31
commit
d0cacd7334
1 changed files with 2 additions and 2 deletions
|
@ -161,7 +161,7 @@ class Interaction:
|
||||||
user = ctx.message.author
|
user = ctx.message.author
|
||||||
|
|
||||||
# Lets get the settings
|
# 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
|
# Get the custom messages we can use
|
||||||
custom_msgs = settings.get('hugs')
|
custom_msgs = settings.get('hugs')
|
||||||
# if they exist, then we want to see if we want to use default as well
|
# 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
|
battleP2 = ctx.message.author
|
||||||
|
|
||||||
# Lets get the settings
|
# 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
|
# Get the custom messages we can use
|
||||||
custom_msgs = settings.get('battles')
|
custom_msgs = settings.get('battles')
|
||||||
# if they exist, then we want to see if we want to use default as well
|
# if they exist, then we want to see if we want to use default as well
|
||||||
|
|
Loading…
Reference in a new issue