Create ArkhamDBClient in setup_hook instead of on_ready
This commit is contained in:
parent
c429278cc8
commit
bbd899cdfb
@ -30,6 +30,9 @@ class ArkhamDBUpdater(discord.Client):
|
||||
with open(self.channel_list_file) as f:
|
||||
self.channel_list = set(json.load(f))
|
||||
|
||||
async def setup_hook(self) -> None:
|
||||
self.arkhamdb_client = ArkhamDBClient()
|
||||
|
||||
async def close(self) -> None:
|
||||
await self.arkhamdb_client.close()
|
||||
await super().close()
|
||||
@ -81,8 +84,6 @@ class ArkhamDBUpdater(discord.Client):
|
||||
await tree.sync()
|
||||
|
||||
async def on_ready(self) -> None:
|
||||
self.arkhamdb_client = ArkhamDBClient()
|
||||
|
||||
logging.info(f"Logged in as {self.user} (ID: {self.user.id})")
|
||||
expected_permissions = permissions = discord.Permissions(
|
||||
read_messages=True,
|
||||
|
Loading…
Reference in New Issue
Block a user