Skip to content

Commit 6d459a4

Browse files
committed
Update config before creating the embed (new main_color would be used)
1 parent 838c009 commit 6d459a4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

cogs/utility.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -495,17 +495,17 @@ async def del_config(self, ctx, key: str.lower):
495495
"""Deletes a key from the config."""
496496
keys = self.bot.config.allowed_to_change_in_command
497497
if key in keys:
498-
embed = Embed(
499-
title='Success',
500-
color=self.bot.main_color,
501-
description=f'`{key}` had been deleted from the config.'
502-
)
503498
try:
504499
del self.bot.config.cache[key]
505500
await self.bot.config.update()
506501
except KeyError:
507502
# when no values were set
508503
pass
504+
embed = Embed(
505+
title='Success',
506+
color=self.bot.main_color,
507+
description=f'`{key}` had been deleted from the config.'
508+
)
509509
else:
510510
embed = Embed(
511511
title='Error',

0 commit comments

Comments
 (0)