diff --git a/lightning/cogs/config/ui.py b/lightning/cogs/config/ui.py index 1623f6dc..26ef8851 100644 --- a/lightning/cogs/config/ui.py +++ b/lightning/cogs/config/ui.py @@ -33,6 +33,12 @@ async def format_initial_message(self, ctx): record = await ctx.bot.get_guild_bot_config(ctx.guild.id) embed = discord.Embed(title="Auto Role Configuration", color=0xf74b06) + if not record: + self.remove_autorole_button.disabled = True + self.add_autorole_button.label = "Add an autorole" + embed.description = "This server has not setup an autorole yet." + return embed + if record.autorole: self.add_autorole_button.label = "Change autorole" self.remove_autorole_button.disabled = False diff --git a/poetry.lock b/poetry.lock index 161aafcf..59cd3b5f 100644 --- a/poetry.lock +++ b/poetry.lock @@ -903,7 +903,7 @@ voice = ["PyNaCl (>=1.3.0,<1.6)"] type = "git" url = "https://github.com/Rapptz/discord.py.git" reference = "master" -resolved_reference = "dee5bf65c63fc2feca00d32e5f4a9fa293636291" +resolved_reference = "df4b1c88df741b439e97049e5c92feb969bdd5d3" [[package]] name = "distlib"