diff options
author | 2022-04-19 10:37:36 +0100 | |
---|---|---|
committer | 2022-04-19 10:37:36 +0100 | |
commit | cbca93e556363bf2c878956730297953be2e62d5 (patch) | |
tree | b3326e112c75214ac5c15a99f212be852a97e21c | |
parent | Remove old task cancellations from modpings cog_unload (diff) |
Move api_client to a kwarg on creation of the Bot
-rw-r--r-- | bot/__main__.py | 8 | ||||
-rw-r--r-- | poetry.lock | 6 | ||||
-rw-r--r-- | pyproject.toml | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/bot/__main__.py b/bot/__main__.py index 06a8de5c1..fc4475068 100644 --- a/bot/__main__.py +++ b/bot/__main__.py @@ -64,12 +64,12 @@ async def main() -> None: allowed_mentions=discord.AllowedMentions(everyone=False, roles=allowed_roles), intents=intents, allowed_roles=list({discord.Object(id_) for id_ in constants.MODERATION_ROLES}), - ) - async with bot.instance as _bot: - _bot.api_client = APIClient( + api_client=APIClient( site_api_url=f"{constants.URLs.site_api_schema}{constants.URLs.site_api}", site_api_token=constants.Keys.site_api, - ) + ), + ) + async with bot.instance as _bot: await _bot.start(constants.Bot.token) diff --git a/poetry.lock b/poetry.lock index 9a70bf6b6..db51794dc 100644 --- a/poetry.lock +++ b/poetry.lock @@ -125,7 +125,7 @@ lxml = ["lxml"] [[package]] name = "bot-core" -version = "5.0.3" +version = "5.0.4" description = "Bot-Core provides the core functionality and utilities for the bots of the Python Discord community." category = "main" optional = false @@ -141,7 +141,7 @@ async-rediscache = ["async-rediscache[fakeredis] (==0.2.0)"] [package.source] type = "url" -url = "https://github.com/python-discord/bot-core/archive/refs/tags/v5.0.3.zip" +url = "https://github.com/python-discord/bot-core/archive/refs/tags/v5.0.4.zip" [[package]] name = "certifi" version = "2021.10.8" @@ -1150,7 +1150,7 @@ multidict = ">=4.0" [metadata] lock-version = "1.1" python-versions = "3.9.*" -content-hash = "03783c24aeb9728b08e829c112709a7110042ecda28cdad983ceb0c7c62c1747" +content-hash = "c1b8132c568892af042b4b561bd4053a9ba05b50e51b350f3e885d89cc7bfa17" [metadata.files] aiodns = [ diff --git a/pyproject.toml b/pyproject.toml index 19f2dd350..ff5188fc1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,7 @@ python = "3.9.*" "discord.py" = {url = "https://github.com/Rapptz/discord.py/archive/414759f3723a3fe632ecfc1343a4164a51cd2940.zip"} # See https://bot-core.pythondiscord.com/ for docs. -bot-core = {url = "https://github.com/python-discord/bot-core/archive/refs/tags/v5.0.3.zip", extras = ["async-rediscache"]} +bot-core = {url = "https://github.com/python-discord/bot-core/archive/refs/tags/v5.0.4.zip", extras = ["async-rediscache"]} aiodns = "3.0.0" aiohttp = "3.8.1" |