Convert State to global
This was just getting too painful to manage, especially passing around these state objects
This commit is contained in:
parent
f926a36069
commit
69005ef498
7 changed files with 69 additions and 71 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue