Ensure entry exists before trying to set anything
This commit is contained in:
parent
f836c146df
commit
b2f2120529
|
@ -726,6 +726,9 @@ WHERE
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
await ctx.send(f"{option} is not a valid config option. Use {ctx.prefix}config to list all config options")
|
await ctx.send(f"{option} is not a valid config option. Use {ctx.prefix}config to list all config options")
|
||||||
else:
|
else:
|
||||||
|
# First make sure there's an entry for this guild before doing anything
|
||||||
|
await ctx.bot.db.execute("INSERT INTO guilds(id) VALUES ($1)", ctx.guild.id)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
await coro(ctx, setting=setting)
|
await coro(ctx, setting=setting)
|
||||||
except WrongSettingType as exc:
|
except WrongSettingType as exc:
|
||||||
|
|
Loading…
Reference in a new issue