mirror of
https://github.com/Matthww/TuneBot.git
synced 2026-09-21 23:27:47 +00:00
Commit hoarding is a terrible practice
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
from typing import Any
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from aioredis.client import Redis
|
||||
@@ -14,12 +15,18 @@ if TYPE_CHECKING:
|
||||
from tunebot import PlaylistSource
|
||||
from tunebot import AutoJoin
|
||||
from utils.classes import BaseCog
|
||||
from tunebot.plugins import ServiceEvent
|
||||
|
||||
AnyDict = dict[Any, Any]
|
||||
|
||||
|
||||
class CustomContext(commands.Context):
|
||||
bot: "TuneBot"
|
||||
cog: "BaseCog"
|
||||
|
||||
async def dispatch(self, event: "ServiceEvent", payload: AnyDict):
|
||||
await self.bot.plugin_manager.dispatch(event, payload)
|
||||
|
||||
@property
|
||||
def redis(self) -> Redis:
|
||||
return self.bot._redis_client
|
||||
|
||||
Reference in New Issue
Block a user