Fixed formatting

This commit is contained in:
2025-04-18 18:18:26 +02:00
parent f7fd81f299
commit fd44276021
4 changed files with 28 additions and 22 deletions

View File

@@ -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__)

View File

@@ -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.

View File

@@ -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)

View File

@@ -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)