Skip to content

Commit

Permalink
Clearer plugin debug messages when plugins are disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
fourjr committed Nov 20, 2020
1 parent ded1bb6 commit 306df8a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ however, insignificant breaking changes do not guarantee a major version bump, s

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

### Improved

- Clearer plugin debug messages when plugins are disabled

# v3.7.8

### Added
Expand Down
8 changes: 8 additions & 0 deletions cogs/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,14 @@ async def load_plugin(self, plugin):

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

if not self.bot.config["enable_plugins"]:
embed = discord.Embed(
description="Plugins are disabled, enable them by setting `ENABLE_PLUGINS=true`",
color=self.bot.main_color,
)
await ctx.send(embed=em)
return

if not self._ready_event.is_set():
embed = discord.Embed(
description="Plugins are still loading, please try again later.",
Expand Down
1 change: 0 additions & 1 deletion core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,6 @@ def get(self, key: str, convert=True) -> typing.Any:
if isinstance(v, list):
new_v = []
for n in v:
print("x", n, v)
if n != -1 and not isinstance(n, str):
changed = True
n = str(n)
Expand Down

0 comments on commit 306df8a

Please # to comment.