Skip to content

Commit cb86aed

Browse files
committed
Add threadmenu toggle notice
Adds a notice to the `threadmenu toggle` command. It gets displayed if the advancedmenu plugin is part of the bot and checks if its enabled at the same time. useful for users because both would interrupt eachother.
1 parent c26af97 commit cb86aed

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

cogs/threadmenu.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,18 @@ async def threadmenu_toggle(self, ctx):
8787
conf["enabled"] = not conf["enabled"]
8888
await self._save_conf(conf)
8989
await ctx.send(f"Thread-creation menu is now {'enabled' if conf['enabled'] else 'disabled'}.")
90+
advancedmenu_plugin = self.bot.get_cog("AdvancedMenu")
91+
if (
92+
advancedmenu_plugin
93+
and hasattr(advancedmenu_plugin, "config")
94+
and advancedmenu_plugin.config.get("enabled")
95+
and advancedmenu_plugin.config["enabled"] is True
96+
and conf["enabled"]
97+
):
98+
await ctx.send(
99+
"**Warning:** You are using both the core threadmenu feature and the advancedmenu plugin.\n"
100+
"It is recommended to disable/uninstall the advancedmenu plugin to avoid interruption."
101+
)
90102

91103
@checks.has_permissions(PermissionLevel.ADMINISTRATOR)
92104
@threadmenu.command(name="show")

0 commit comments

Comments
 (0)