diff --git a/classes/pycord_bot.py b/classes/pycord_bot.py index 731291c..c32f237 100644 --- a/classes/pycord_bot.py +++ b/classes/pycord_bot.py @@ -1,12 +1,12 @@ from logging import Logger from typing import Any -from discord import User, Guild +from discord import Guild, User from libbot.cache.classes import CacheMemcached, CacheRedis from libbot.cache.manager import create_cache_client from libbot.pycord.classes import PycordBot as LibPycordBot -from classes import PycordUser, PycordGuild +from classes import PycordGuild, PycordUser from modules.logging_utils import get_logger logger: Logger = get_logger(__name__) diff --git a/classes/pycord_guild.py b/classes/pycord_guild.py index 8775bbf..68f8db9 100644 --- a/classes/pycord_guild.py +++ b/classes/pycord_guild.py @@ -28,7 +28,7 @@ class PycordGuild: @classmethod async def from_id( - cls, guild_id: int, allow_creation: bool = True, cache: Optional[Cache] = None + cls, guild_id: int, allow_creation: bool = True, cache: Optional[Cache] = None ) -> "PycordGuild": """Find guild in database and create new record if guild does not exist. diff --git a/cogs/config.py b/cogs/config.py index 18dcb7a..303f711 100644 --- a/cogs/config.py +++ b/cogs/config.py @@ -1,4 +1,10 @@ -from discord import SlashCommandGroup, option, CategoryChannel, ApplicationContext, TextChannel +from discord import ( + ApplicationContext, + CategoryChannel, + SlashCommandGroup, + TextChannel, + option, +) from discord.ext.commands import Cog from classes import PycordGuild @@ -22,7 +28,7 @@ class Config(Cog): @option("category", description="Category where channels for each user will be created", required=True) @option("channel", description="Text channel for admin notifications", required=True) async def command_config_set( - self, ctx: ApplicationContext, category: CategoryChannel, channel: TextChannel + self, ctx: ApplicationContext, category: CategoryChannel, channel: TextChannel ) -> None: guild: PycordGuild = await self.bot.find_guild(ctx.guild.id) diff --git a/cogs/event.py b/cogs/event.py index 4611051..2b1a583 100644 --- a/cogs/event.py +++ b/cogs/event.py @@ -1,4 +1,4 @@ -from discord import SlashCommandGroup, option, ApplicationContext, Attachment +from discord import ApplicationContext, Attachment, SlashCommandGroup, option from discord.ext.commands import Cog from classes import PycordGuild @@ -24,12 +24,12 @@ class Event(Cog): @option("finish", description="Date when the event finishes (DD.MM.YYYY)", required=True) @option("thumbnail", description="Thumbnail of the event", required=False) async def command_event_create( - self, - ctx: ApplicationContext, - name: str, - start: str, - finish: str, - thumbnail: Attachment = None, + self, + ctx: ApplicationContext, + name: str, + start: str, + finish: str, + thumbnail: Attachment = None, ) -> None: guild: PycordGuild = await self.bot.find_guild(ctx.guild.id) @@ -46,13 +46,13 @@ class Event(Cog): @option("finish", description="Date when the event finishes (DD.MM.YYYY)", required=False) @option("thumbnail", description="Thumbnail of the event", required=False) async def command_event_edit( - self, - ctx: ApplicationContext, - event: str, - name: str, - start: str, - finish: str, - thumbnail: Attachment = None, + self, + ctx: ApplicationContext, + event: str, + name: str, + start: str, + finish: str, + thumbnail: Attachment = None, ) -> None: guild: PycordGuild = await self.bot.find_guild(ctx.guild.id) @@ -65,9 +65,9 @@ class Event(Cog): ) @option("name", description="Name of the event", required=True) async def command_event_cancel( - self, - ctx: ApplicationContext, - name: str, + self, + ctx: ApplicationContext, + name: str, ) -> None: guild: PycordGuild = await self.bot.find_guild(ctx.guild.id)