Convert State to global

This was just getting too painful to manage, especially passing around these state objects
This commit is contained in:
Marc Di Luzio 2024-08-17 14:58:19 +01:00
parent f926a36069
commit 69005ef498
7 changed files with 69 additions and 71 deletions

View file

@ -2,7 +2,6 @@ import discord
import discord.ext.commands as commands
import pytest
import pytest_asyncio
import matchy.state as state
import discord.ext.test as dpytest
from matchy.cogs.owner import OwnerCog
@ -20,7 +19,7 @@ async def bot():
b = commands.Bot(command_prefix="$",
intents=intents)
await b._async_setup_hook()
await b.add_cog(OwnerCog(b, state.State(state._EMPTY_DICT)))
await b.add_cog(OwnerCog(b))
dpytest.configure(b)
yield b
await dpytest.empty_queue()