diff options
-rw-r--r-- | pydis_core/_bot.py | 2 | ||||
-rw-r--r-- | pydis_core/site_api.py | 4 | ||||
-rw-r--r-- | pydis_core/utils/checks.py | 1 | ||||
-rw-r--r-- | pydis_core/utils/pagination.py | 1 |
4 files changed, 5 insertions, 3 deletions
diff --git a/pydis_core/_bot.py b/pydis_core/_bot.py index 365b67b3..0427c659 100644 --- a/pydis_core/_bot.py +++ b/pydis_core/_bot.py @@ -146,7 +146,7 @@ class BotBase(commands.Bot): await self.tree.sync() await self.tree.sync(guild=discord.Object(self.guild_id)) - async def load_extensions(self, module: types.ModuleType, sync_app_commands: bool = True) -> None: + async def load_extensions(self, module: types.ModuleType, *, sync_app_commands: bool = True) -> None: """ Load all the extensions within the given ``module`` and save them to ``self.all_extensions``. diff --git a/pydis_core/site_api.py b/pydis_core/site_api.py index 69e0ceba..f948cde3 100644 --- a/pydis_core/site_api.py +++ b/pydis_core/site_api.py @@ -76,7 +76,7 @@ class APIClient: await self.session.close() @staticmethod - async def maybe_raise_for_status(response: aiohttp.ClientResponse, should_raise: bool) -> None: + async def maybe_raise_for_status(response: aiohttp.ClientResponse, *, should_raise: bool) -> None: """ Raise :exc:`ResponseCodeError` for non-OK response if an exception should be raised. @@ -117,7 +117,7 @@ class APIClient: if resp.status == 204: return None - await self.maybe_raise_for_status(resp, raise_for_status) + await self.maybe_raise_for_status(resp, should_raise=raise_for_status) return await resp.json() async def get(self, endpoint: str, *, raise_for_status: bool = True, **kwargs) -> dict | None: diff --git a/pydis_core/utils/checks.py b/pydis_core/utils/checks.py index 50fb2082..3ae92489 100644 --- a/pydis_core/utils/checks.py +++ b/pydis_core/utils/checks.py @@ -43,6 +43,7 @@ def in_whitelist_check( channels: Container[int] = (), categories: Container[int] = (), roles: Container[int] = (), + *, fail_silently: bool = False, ) -> bool: """ diff --git a/pydis_core/utils/pagination.py b/pydis_core/utils/pagination.py index dd7f1edc..1d2b32c3 100644 --- a/pydis_core/utils/pagination.py +++ b/pydis_core/utils/pagination.py @@ -194,6 +194,7 @@ class LinePaginator(Paginator): lines: list[str], ctx: Context | discord.Interaction, embed: discord.Embed, + *, prefix: str = "", suffix: str = "", max_lines: int | None = None, |