Commit hoarding is a terrible practice

This commit is contained in:
2021-12-06 20:14:24 +01:00
parent 76bfd719c3
commit 2a24a4b5f0
15 changed files with 485 additions and 36 deletions
+7
View File
@@ -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