Skip to content

Commit 2093474

Browse files
committed
fix: Fix enable and disable modules
1 parent 99d1f91 commit 2093474

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/bot/cogs/admin.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
from bot.utils.console_logger import console_logger
1919
from bot.utils.decorators import admin_only
2020

21+
# todo: logic should ideally all be moved into core
22+
# todo: currently, the bot does not persist the enabled/disabled states of modules - it'll be ideal to persist
23+
2124

2225
class AdminCog(commands.Cog):
2326
"""
@@ -115,7 +118,9 @@ async def module_enable(self, interaction: discord.Interaction, module: str):
115118
module (str): The name of the module to enable.
116119
117120
"""
118-
await self.cogs_manager.enable_cog(module)
121+
message = await self.cogs_manager.enable_cog(module)
122+
await interaction.response.send_message(message, ephemeral=True)
123+
119124

120125
@module_group.command(name="disable", description="Disable a specific bot module")
121126
@app_commands.describe(module="The name of the module to disable")
@@ -131,7 +136,8 @@ async def module_disable(self, interaction: discord.Interaction, module: str):
131136
module (str): The name of the module to disable.
132137
133138
"""
134-
await self.cogs_manager.disable_cog(module)
139+
message = await self.cogs_manager.disable_cog(module)
140+
await interaction.response.send_message(message, ephemeral=True)
135141

136142
@app_commands.command(
137143
name="sync_commands",

0 commit comments

Comments
 (0)