diff --git a/cogs/autopin/cog.py b/cogs/autopin/cog.py index 3bd963c83..aea7b70d6 100644 --- a/cogs/autopin/cog.py +++ b/cogs/autopin/cog.py @@ -27,7 +27,7 @@ def __init__(self, bot: commands.Bot): self.check = room_check.RoomCheck(bot) self.pin_features = AutopinFeatures(bot) - async def api(self, message: commands.Context, params: list): + async def api(self, message: commands.Context, params: dict): """Sending pins from channel to grillbot""" if "command" in params and params["command"] is not None: if params["command"] == "pin_get_all": @@ -107,7 +107,7 @@ async def get_list(self, inter: disnake.ApplicationCommandInteraction): message: disnake.Message = await channel.fetch_message(int(item.message_id)) msg: str = MessagesCZ.list_item(channel=channel.mention, url=message.jump_url) except disnake.NotFound: - msg: str = MessagesCZ.list_unknown_message(channel=channel.mention) + msg = MessagesCZ.list_unknown_message(channel=channel.mention) finally: lines.append(msg) diff --git a/cogs/autopin/features.py b/cogs/autopin/features.py index 4c0e7f675..106e1b1a1 100644 --- a/cogs/autopin/features.py +++ b/cogs/autopin/features.py @@ -1,13 +1,15 @@ import datetime import io import json +from typing import TypeAlias import disnake from disnake.ext import commands import utils +from config.app_config import config -PIN_CHANNEL_TYPE = disnake.TextChannel | disnake.Thread +PIN_CHANNEL_TYPE: TypeAlias = disnake.TextChannel | disnake.Thread class AutopinFeatures: @@ -25,7 +27,7 @@ async def log(self, message: disnake.Message, users: list[disnake.User]): name="Message in channel", value=f"[#{message.channel.name}]({message.jump_url})", inline=False ) embed.timestamp = datetime.datetime.now(tz=datetime.timezone.utc) - channel = self.bot.get_channel(self.config.log_channel) + channel = self.bot.get_channel(config.log_channel) await channel.send(embed=embed) async def create_json_file(