Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull 2 changes from upstream #14

Merged
merged 2 commits into from
Jul 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ however, insignificant breaking changes do not guarantee a major version bump, s
### Changed
- Repo moved to https://github.com/modmail-dev/modmail.

### Internal
- `ConfigManager.get` no longer accepts two positional arguments: the `convert` argument is now keyword-only.

# v4.0.2

### Breaking
Expand Down
6 changes: 3 additions & 3 deletions cogs/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,10 +302,10 @@ async def parse_user_input(self, ctx, plugin_name, check_version=False):
plugin = Plugin(user, repo, plugin_name, branch)

else:
if not self.bot.config.get("registry_plugins_only", False):
if self.bot.config.get("registry_plugins_only"):
embed = discord.Embed(
description="This plugin is not in the registry. "
"To install it, you must set `REGISTRY_PLUGINS_ONLY=false` in your .env file or config settings.",
description="This plugin is not in the registry. To install this plugin, "
"you must set `REGISTRY_PLUGINS_ONLY=no` or remove this key in your .env file.",
color=self.bot.error_color,
)
await ctx.send(embed=embed)
Expand Down
2 changes: 1 addition & 1 deletion core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def __getitem__(self, key: str) -> typing.Any:
def __delitem__(self, key: str) -> None:
return self.remove(key)

def get(self, key: str, convert=True) -> typing.Any:
def get(self, key: str, *, convert: bool = True) -> typing.Any:
key = key.lower()
if key not in self.all_keys:
raise InvalidConfigError(f'Configuration "{key}" is invalid.')
Expand Down
Loading