Skip to content

Commit 306df8a

Browse files
committed
Clearer plugin debug messages when plugins are disabled
1 parent ded1bb6 commit 306df8a

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ however, insignificant breaking changes do not guarantee a major version bump, s
1212

1313
- `perms add/remove` with permission levels should now work again. ([PR #2893](https://github.com/kyb3r/modmail/pull/2893))
1414

15+
### Improved
16+
17+
- Clearer plugin debug messages when plugins are disabled
18+
1519
# v3.7.8
1620

1721
### Added

cogs/plugins.py

+8
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,14 @@ async def load_plugin(self, plugin):
248248

249249
async def parse_user_input(self, ctx, plugin_name, check_version=False):
250250

251+
if not self.bot.config["enable_plugins"]:
252+
embed = discord.Embed(
253+
description="Plugins are disabled, enable them by setting `ENABLE_PLUGINS=true`",
254+
color=self.bot.main_color,
255+
)
256+
await ctx.send(embed=em)
257+
return
258+
251259
if not self._ready_event.is_set():
252260
embed = discord.Embed(
253261
description="Plugins are still loading, please try again later.",

core/config.py

-1
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,6 @@ def get(self, key: str, convert=True) -> typing.Any:
310310
if isinstance(v, list):
311311
new_v = []
312312
for n in v:
313-
print("x", n, v)
314313
if n != -1 and not isinstance(n, str):
315314
changed = True
316315
n = str(n)

0 commit comments

Comments
 (0)