diff --git a/bot.py b/bot.py index eafa03f..13f6248 100644 --- a/bot.py +++ b/bot.py @@ -282,4 +282,4 @@ if __name__ == "__main__": except KeyboardInterrupt: logger.info("Received keyboard interrupt") except Exception as e: - logger.critical(f"Fatal error during bot execution: {type(e).__name__}: {e}") \ No newline at end of file + logger.critical(f"Fatal error during bot execution: {type(e).__name__}: {e}") diff --git a/cogs/botinfo.py b/cogs/botinfo.py index 1bc576a..f8be258 100644 --- a/cogs/botinfo.py +++ b/cogs/botinfo.py @@ -4,7 +4,6 @@ from discord import app_commands from discord.ext import commands from discord.ext.commands import Context from datetime import datetime -import time import pytz from utils.contributors import generate_contributors_image diff --git a/cogs/events/mention.py b/cogs/events/mention.py index cba4a28..efd70c3 100644 --- a/cogs/events/mention.py +++ b/cogs/events/mention.py @@ -35,5 +35,3 @@ class MentionListener(commands.Cog): self.bot.logger.debug( f"Failed to react with fallback emoji: {fallback_error}" ) - - diff --git a/cogs/fun/minesweeper.py b/cogs/fun/minesweeper.py index 3c9c53a..cfc5c15 100644 --- a/cogs/fun/minesweeper.py +++ b/cogs/fun/minesweeper.py @@ -1,5 +1,4 @@ import random -from itertools import repeat import discord from discord.ext import commands import asyncio @@ -62,21 +61,21 @@ class RowButton(discord.ui.Button): def checkpos(count, rawpos, pos): pos = view.GetBoardPos(rawpos) - if not rawpos - 1 in self.bombs or pos == 0: + if rawpos - 1 not in self.bombs or pos == 0: count.append(rawpos - 1) - if not rawpos + 1 in self.bombs or pos == 4: + if rawpos + 1 not in self.bombs or pos == 4: count.append(rawpos + 1) - if not rawpos - 6 in self.bombs or pos == 0: + if rawpos - 6 not in self.bombs or pos == 0: count.append(rawpos - 6) - if not rawpos - 4 in self.bombs or pos == 4: + if rawpos - 4 not in self.bombs or pos == 4: count.append(rawpos - 4) - if not rawpos + 6 in self.bombs or pos == 4: + if rawpos + 6 not in self.bombs or pos == 4: count.append(rawpos + 6) - if not rawpos + 4 in self.bombs or pos == 0: + if rawpos + 4 not in self.bombs or pos == 0: count.append(rawpos + 4) - if not rawpos - 5 in self.bombs: + if rawpos - 5 not in self.bombs: count.append(rawpos - 5) - if not rawpos + 5 in self.bombs: + if rawpos + 5 not in self.bombs: count.append(rawpos + 5) return count diff --git a/cogs/fun/randomfact.py b/cogs/fun/randomfact.py index 2662479..6459d44 100644 --- a/cogs/fun/randomfact.py +++ b/cogs/fun/randomfact.py @@ -1,4 +1,3 @@ -import aiohttp import discord from discord.ext import commands diff --git a/cogs/general/feedback.py b/cogs/general/feedback.py index af0c1b9..ead0be6 100644 --- a/cogs/general/feedback.py +++ b/cogs/general/feedback.py @@ -1,9 +1,8 @@ import discord -from discord import app_commands from discord.ext import commands -class FeedbackForm(discord.ui.Modal, title="Feeedback"): +class FeedbackForm(discord.ui.Modal, title="Feedback"): feedback = discord.ui.TextInput( label="What do you think about this bot?", style=discord.TextStyle.long, diff --git a/cogs/general/userinfo.py b/cogs/general/userinfo.py index 431bd82..d00c171 100644 --- a/cogs/general/userinfo.py +++ b/cogs/general/userinfo.py @@ -2,10 +2,8 @@ import discord from discord.ext import commands from discord import app_commands import aiohttp -import asyncio from io import BytesIO from PIL import Image -import re from datetime import datetime, timezone ONE_MONTH = 2628000 diff --git a/cogs/idevice/__init__.py b/cogs/idevice/__init__.py index e44fc53..880fba3 100644 --- a/cogs/idevice/__init__.py +++ b/cogs/idevice/__init__.py @@ -31,7 +31,9 @@ class Idevice(commands.GroupCog, name="idevice"): await context.send(embed=embed, view=view) @idevice_group.command(name="errorcodes") - async def idevice_group_errorcodes(self, context: Context, *, error_code: str = None): + async def idevice_group_errorcodes( + self, context: Context, *, error_code: str = None + ): await self._invoke_hybrid(context, "errorcodes", error_code=error_code) @idevice_group.command(name="developermode") diff --git a/cogs/idevice/developermode.py b/cogs/idevice/developermode.py index 794e0a9..b0a745e 100644 --- a/cogs/idevice/developermode.py +++ b/cogs/idevice/developermode.py @@ -1,8 +1,5 @@ import discord -from discord import app_commands from discord.ext import commands -from discord.ext.commands import Context -import time def developermode_command(): @@ -24,7 +21,7 @@ def developermode_command(): embed.set_author( name="idevice", icon_url="https://yes.nighty.works/raw/snLMuO.png" ) - embed.set_footer(text=f"Last Edited by neoarz") + embed.set_footer(text="Last Edited by neoarz") embed.timestamp = discord.utils.utcnow() view = discord.ui.View() diff --git a/cogs/idevice/idevice.py b/cogs/idevice/idevice.py index cb3c344..d4cad6c 100644 --- a/cogs/idevice/idevice.py +++ b/cogs/idevice/idevice.py @@ -1,7 +1,5 @@ import discord -from discord import app_commands from discord.ext import commands -from discord.ext.commands import Context import json import os import math diff --git a/cogs/idevice/mountddi.py b/cogs/idevice/mountddi.py index 95cf142..5eae247 100644 --- a/cogs/idevice/mountddi.py +++ b/cogs/idevice/mountddi.py @@ -1,6 +1,5 @@ import discord from discord.ext import commands -from discord.ext.commands import Context import os diff --git a/cogs/idevice/noapps.py b/cogs/idevice/noapps.py index e54dcfe..8816e67 100644 --- a/cogs/idevice/noapps.py +++ b/cogs/idevice/noapps.py @@ -1,8 +1,5 @@ import discord -from discord import app_commands from discord.ext import commands -from discord.ext.commands import Context -import time def noapps_command(): @@ -26,7 +23,7 @@ def noapps_command(): embed.set_author( name="idevice", icon_url="https://yes.nighty.works/raw/snLMuO.png" ) - embed.set_footer(text=f"Last Edited by neoarz") + embed.set_footer(text="Last Edited by neoarz") embed.timestamp = discord.utils.utcnow() view = discord.ui.View() diff --git a/cogs/livecontainer/__init__.py b/cogs/livecontainer/__init__.py index c654a36..357ead1 100644 --- a/cogs/livecontainer/__init__.py +++ b/cogs/livecontainer/__init__.py @@ -22,7 +22,8 @@ class Livecontainer(commands.GroupCog, name="livecontainer"): color=0x0169FF, ) embed.set_author( - name="LiveContainer", icon_url="https://raw.githubusercontent.com/LiveContainer/LiveContainer/main/screenshots/livecontainer_icon.png" + name="LiveContainer", + icon_url="https://raw.githubusercontent.com/LiveContainer/LiveContainer/main/screenshots/livecontainer_icon.png", ) view = LivecontainerView(self.bot) await context.send(embed=embed, view=view) @@ -35,7 +36,8 @@ class Livecontainer(commands.GroupCog, name="livecontainer"): color=0x0169FF, ) embed.set_author( - name="LiveContainer", icon_url="https://raw.githubusercontent.com/LiveContainer/LiveContainer/main/screenshots/livecontainer_icon.png" + name="LiveContainer", + icon_url="https://raw.githubusercontent.com/LiveContainer/LiveContainer/main/screenshots/livecontainer_icon.png", ) view = LivecontainerView(self.bot) await context.send(embed=embed, view=view) @@ -69,7 +71,8 @@ class Livecontainer(commands.GroupCog, name="livecontainer"): color=0x0169FF, ) embed.set_author( - name="LiveContainer", icon_url="https://raw.githubusercontent.com/LiveContainer/LiveContainer/main/screenshots/livecontainer_icon.png" + name="LiveContainer", + icon_url="https://raw.githubusercontent.com/LiveContainer/LiveContainer/main/screenshots/livecontainer_icon.png", ) view = LivecontainerView(self.bot) await interaction.response.send_message(embed=embed, view=view, ephemeral=True) @@ -88,4 +91,3 @@ async def setup(bot) -> None: bot.logger.info("Loaded extension 'livecontainer.help'") bot.logger.info("Loaded extension 'livecontainer.26jit'") - diff --git a/cogs/livecontainer/jit26.py b/cogs/livecontainer/jit26.py index adc958a..311e6c1 100644 --- a/cogs/livecontainer/jit26.py +++ b/cogs/livecontainer/jit26.py @@ -12,13 +12,24 @@ def jit26_command(): ), ) embed.set_author( - name="LiveContainer", icon_url="https://raw.githubusercontent.com/LiveContainer/LiveContainer/main/screenshots/livecontainer_icon.png" + name="LiveContainer", + icon_url="https://raw.githubusercontent.com/LiveContainer/LiveContainer/main/screenshots/livecontainer_icon.png", ) - embed.set_footer(icon_url="https://yes.nighty.works/raw/2PPWd3.webp", text="Made By CelloSerenity") - + embed.set_footer( + icon_url="https://yes.nighty.works/raw/2PPWd3.webp", + text="Made By CelloSerenity", + ) + view = discord.ui.View() - view.add_item(discord.ui.Button(label="Get Started", url="https://github.com/CelloSerenity/iOS-26-Sideloading-and-JIT-Complete-Walkthrough", style=discord.ButtonStyle.primary, emoji="<:githubicon:1417717356846776340>")) - + view.add_item( + discord.ui.Button( + label="Get Started", + url="https://github.com/CelloSerenity/iOS-26-Sideloading-and-JIT-Complete-Walkthrough", + style=discord.ButtonStyle.primary, + emoji="<:githubicon:1417717356846776340>", + ) + ) + if context.interaction: await context.interaction.response.send_message(embed=embed, view=view) else: diff --git a/cogs/livecontainer/livecontainer.py b/cogs/livecontainer/livecontainer.py index 2177d27..8ed672e 100644 --- a/cogs/livecontainer/livecontainer.py +++ b/cogs/livecontainer/livecontainer.py @@ -11,7 +11,9 @@ class LivecontainerSelect(discord.ui.Select): description="Walkthrough for iOS 26 JIT and sideloading", ), ] - super().__init__(placeholder="Choose a LiveContainer command...", options=options) + super().__init__( + placeholder="Choose a LiveContainer command...", options=options + ) async def callback(self, interaction: discord.Interaction): command_name = self.values[0] diff --git a/cogs/media/mcquote.py b/cogs/media/mcquote.py index 3be0fca..49185d9 100644 --- a/cogs/media/mcquote.py +++ b/cogs/media/mcquote.py @@ -1,4 +1,3 @@ -import asyncio import os import tempfile import discord diff --git a/cogs/media/tts.py b/cogs/media/tts.py index 0fd6496..151bc1d 100644 --- a/cogs/media/tts.py +++ b/cogs/media/tts.py @@ -1,6 +1,5 @@ import asyncio import io -import tempfile from typing import Optional import discord diff --git a/cogs/media/tweety.py b/cogs/media/tweety.py index 85179af..fd8f635 100644 --- a/cogs/media/tweety.py +++ b/cogs/media/tweety.py @@ -267,7 +267,7 @@ class TweetyView(discord.ui.View): os.remove(temp_file_path) - except Exception as e: + except Exception: embed = discord.Embed( title="Error", description="Error regenerating tweet image", @@ -462,7 +462,7 @@ def tweety_command(): ) embed = discord.Embed( title="Tweet Generated", - description=f"<:error:1424007141768822824> Tweet sometimes may look a bit broken, im gonna rewrite the API another time... (it wasnt made for Syntrel in the first place)", + description="<:error:1424007141768822824> Tweet sometimes may look a bit broken, im gonna rewrite the API another time... (it wasnt made for Syntrel in the first place)", color=0x7289DA, ) embed.set_author( @@ -491,7 +491,7 @@ def tweety_command(): await processing_msg.delete() embed = discord.Embed( title="Error", - description=f"Connection error: Could not reach tweet API", + description="Connection error: Could not reach tweet API", color=0xE02B2B, ) embed.set_author( diff --git a/cogs/melonx/error.py b/cogs/melonx/error.py index c02c45e..759dd01 100644 --- a/cogs/melonx/error.py +++ b/cogs/melonx/error.py @@ -1,8 +1,5 @@ import discord -from discord import app_commands from discord.ext import commands -from discord.ext.commands import Context -import time def error_command(): @@ -23,7 +20,7 @@ def error_command(): embed.set_author( name="MeloNX", icon_url="https://yes.nighty.works/raw/TLGaVa.png" ) - embed.set_footer(text=f"Last Edited by Meshal :D") + embed.set_footer(text="Last Edited by Meshal :D") embed.timestamp = discord.utils.utcnow() view = discord.ui.View() diff --git a/cogs/melonx/gamecrash.py b/cogs/melonx/gamecrash.py index 2768eff..baca06e 100644 --- a/cogs/melonx/gamecrash.py +++ b/cogs/melonx/gamecrash.py @@ -1,8 +1,5 @@ import discord -from discord import app_commands from discord.ext import commands -from discord.ext.commands import Context -import time def crash_command(): @@ -26,7 +23,7 @@ def crash_command(): embed.set_author( name="MeloNX", icon_url="https://yes.nighty.works/raw/TLGaVa.png" ) - embed.set_footer(text=f"Last Edited by Meshal :D") + embed.set_footer(text="Last Edited by Meshal :D") embed.timestamp = discord.utils.utcnow() view = discord.ui.View() diff --git a/cogs/melonx/ios26.py b/cogs/melonx/ios26.py index cd0a24c..7086c56 100644 --- a/cogs/melonx/ios26.py +++ b/cogs/melonx/ios26.py @@ -1,8 +1,5 @@ import discord -from discord import app_commands from discord.ext import commands -from discord.ext.commands import Context -import time def ios26_command(): @@ -26,7 +23,7 @@ def ios26_command(): embed.set_author( name="MeloNX", icon_url="https://yes.nighty.works/raw/TLGaVa.png" ) - embed.set_footer(text=f"Last Edited by Meshal :D") + embed.set_footer(text="Last Edited by Meshal :D") embed.timestamp = discord.utils.utcnow() view = discord.ui.View() diff --git a/cogs/melonx/legal.py b/cogs/melonx/legal.py index ed40c3f..dfe0b06 100644 --- a/cogs/melonx/legal.py +++ b/cogs/melonx/legal.py @@ -1,8 +1,5 @@ import discord -from discord import app_commands from discord.ext import commands -from discord.ext.commands import Context -import time def legal_command(): @@ -38,7 +35,7 @@ def legal_command(): embed.set_author( name="MeloNX", icon_url="https://yes.nighty.works/raw/TLGaVa.png" ) - embed.set_footer(text=f"Last Edited by stossy11") + embed.set_footer(text="Last Edited by stossy11") embed.timestamp = discord.utils.utcnow() view = discord.ui.View() diff --git a/cogs/melonx/mods.py b/cogs/melonx/mods.py index 1c64509..98f5dbb 100644 --- a/cogs/melonx/mods.py +++ b/cogs/melonx/mods.py @@ -1,8 +1,5 @@ import discord -from discord import app_commands from discord.ext import commands -from discord.ext.commands import Context -import time def mods_command(): @@ -29,7 +26,7 @@ def mods_command(): embed.set_author( name="MeloNX", icon_url="https://yes.nighty.works/raw/TLGaVa.png" ) - embed.set_footer(text=f"Last Edited by Meshal :D") + embed.set_footer(text="Last Edited by Meshal :D") embed.timestamp = discord.utils.utcnow() view = discord.ui.View() diff --git a/cogs/melonx/requirements.py b/cogs/melonx/requirements.py index 9ae3780..bbd308b 100644 --- a/cogs/melonx/requirements.py +++ b/cogs/melonx/requirements.py @@ -1,8 +1,5 @@ import discord -from discord import app_commands from discord.ext import commands -from discord.ext.commands import Context -import time def requirements_command(): @@ -24,7 +21,7 @@ def requirements_command(): embed.set_author( name="MeloNX", icon_url="https://yes.nighty.works/raw/TLGaVa.png" ) - embed.set_footer(text=f"Last Edited by Meshal :D") + embed.set_footer(text="Last Edited by Meshal :D") embed.timestamp = discord.utils.utcnow() view = discord.ui.View() diff --git a/cogs/melonx/transfer.py b/cogs/melonx/transfer.py index a4cb545..faecd6d 100644 --- a/cogs/melonx/transfer.py +++ b/cogs/melonx/transfer.py @@ -1,8 +1,5 @@ import discord -from discord import app_commands from discord.ext import commands -from discord.ext.commands import Context -import time def transfer_command(): @@ -35,7 +32,7 @@ def transfer_command(): embed.set_author( name="MeloNX", icon_url="https://yes.nighty.works/raw/TLGaVa.png" ) - embed.set_footer(text=f"Last Edited by Meshal :D") + embed.set_footer(text="Last Edited by Meshal :D") embed.timestamp = discord.utils.utcnow() view = discord.ui.View() diff --git a/cogs/melonx/upgrade.py b/cogs/melonx/upgrade.py index afe294d..c4058ab 100644 --- a/cogs/melonx/upgrade.py +++ b/cogs/melonx/upgrade.py @@ -57,4 +57,3 @@ def upgrade_command(): await context.send(embed=embed, view=view) return upgrade - diff --git a/cogs/miscellaneous/depart.py b/cogs/miscellaneous/depart.py index a0d2b80..2b105ea 100644 --- a/cogs/miscellaneous/depart.py +++ b/cogs/miscellaneous/depart.py @@ -1,6 +1,5 @@ import discord from discord.ext import commands -from discord.ext.commands import Context import aiohttp import io diff --git a/cogs/miscellaneous/docs.py b/cogs/miscellaneous/docs.py index 8322b48..189d060 100644 --- a/cogs/miscellaneous/docs.py +++ b/cogs/miscellaneous/docs.py @@ -1,6 +1,5 @@ import discord from discord.ext import commands -from discord.ext.commands import Context import aiohttp import io diff --git a/cogs/miscellaneous/dontasktoask.py b/cogs/miscellaneous/dontasktoask.py index 8f35ca0..3a799ff 100644 --- a/cogs/miscellaneous/dontasktoask.py +++ b/cogs/miscellaneous/dontasktoask.py @@ -1,6 +1,5 @@ import discord from discord.ext import commands -from discord.ext.commands import Context import aiohttp import io diff --git a/cogs/miscellaneous/duck.py b/cogs/miscellaneous/duck.py index 67c3822..4076636 100644 --- a/cogs/miscellaneous/duck.py +++ b/cogs/miscellaneous/duck.py @@ -1,6 +1,4 @@ -import discord from discord.ext import commands -from discord.ext.commands import Context def duck_command(): diff --git a/cogs/miscellaneous/keanu.py b/cogs/miscellaneous/keanu.py index 309de4a..4b6a85d 100644 --- a/cogs/miscellaneous/keanu.py +++ b/cogs/miscellaneous/keanu.py @@ -1,6 +1,5 @@ import discord from discord.ext import commands -from discord.ext.commands import Context import random diff --git a/cogs/miscellaneous/labubu.py b/cogs/miscellaneous/labubu.py index ac9f8ab..edd3217 100644 --- a/cogs/miscellaneous/labubu.py +++ b/cogs/miscellaneous/labubu.py @@ -1,6 +1,5 @@ import discord from discord.ext import commands -from discord.ext.commands import Context def labubu_command(): @@ -52,7 +51,7 @@ def labubu_command(): embed.set_author( name="Labubu", icon_url="https://yes.nighty.works/raw/YxMC0r.png" ) - embed.set_footer(text=f"May look broken on mobile") + embed.set_footer(text="May look broken on mobile") if getattr(context, "interaction", None): inter = context.interaction diff --git a/cogs/miscellaneous/piracy.py b/cogs/miscellaneous/piracy.py index f764a9b..a5fc3b0 100644 --- a/cogs/miscellaneous/piracy.py +++ b/cogs/miscellaneous/piracy.py @@ -1,6 +1,5 @@ import discord from discord.ext import commands -from discord.ext.commands import Context import aiohttp import io diff --git a/cogs/miscellaneous/rickroll.py b/cogs/miscellaneous/rickroll.py index dd0503e..708442f 100644 --- a/cogs/miscellaneous/rickroll.py +++ b/cogs/miscellaneous/rickroll.py @@ -1,6 +1,5 @@ import discord from discord.ext import commands -from discord.ext.commands import Context import aiohttp import io diff --git a/cogs/miscellaneous/sigma.py b/cogs/miscellaneous/sigma.py index e989dd0..a103104 100644 --- a/cogs/miscellaneous/sigma.py +++ b/cogs/miscellaneous/sigma.py @@ -1,6 +1,5 @@ import discord from discord.ext import commands -from discord.ext.commands import Context import aiohttp import io diff --git a/cogs/miscellaneous/silly.py b/cogs/miscellaneous/silly.py index 0770903..271285a 100644 --- a/cogs/miscellaneous/silly.py +++ b/cogs/miscellaneous/silly.py @@ -1,6 +1,4 @@ -import discord from discord.ext import commands -from discord.ext.commands import Context def silly_command(): diff --git a/cogs/miscellaneous/support.py b/cogs/miscellaneous/support.py index f1cb2eb..f5ff02d 100644 --- a/cogs/miscellaneous/support.py +++ b/cogs/miscellaneous/support.py @@ -1,6 +1,5 @@ import discord from discord.ext import commands -from discord.ext.commands import Context import aiohttp import io diff --git a/cogs/miscellaneous/tryitandsee.py b/cogs/miscellaneous/tryitandsee.py index 2db4d96..4159e45 100644 --- a/cogs/miscellaneous/tryitandsee.py +++ b/cogs/miscellaneous/tryitandsee.py @@ -1,6 +1,4 @@ -import discord from discord.ext import commands -from discord.ext.commands import Context def tryitandsee_command(): diff --git a/cogs/moderation/archive.py b/cogs/moderation/archive.py index 7f3edd0..5964b17 100644 --- a/cogs/moderation/archive.py +++ b/cogs/moderation/archive.py @@ -3,7 +3,6 @@ from datetime import datetime import discord from discord import app_commands from discord.ext import commands -from discord.ext.commands import Context def archive_command(): diff --git a/cogs/moderation/ban.py b/cogs/moderation/ban.py index bc68f49..cad012d 100644 --- a/cogs/moderation/ban.py +++ b/cogs/moderation/ban.py @@ -1,7 +1,6 @@ import discord from discord import app_commands from discord.ext import commands -from discord.ext.commands import Context def ban_command(): @@ -222,7 +221,7 @@ def ban_command(): ) await context.send(embed=embed, ephemeral=True) - except Exception as e: + except Exception: embed = discord.Embed( title="Error!", description="An unexpected error occurred.", diff --git a/cogs/moderation/hackban.py b/cogs/moderation/hackban.py index e849073..52fe648 100644 --- a/cogs/moderation/hackban.py +++ b/cogs/moderation/hackban.py @@ -1,7 +1,6 @@ import discord from discord import app_commands from discord.ext import commands -from discord.ext.commands import Context def hackban_command(): diff --git a/cogs/moderation/kick.py b/cogs/moderation/kick.py index cd08cdb..b08e4aa 100644 --- a/cogs/moderation/kick.py +++ b/cogs/moderation/kick.py @@ -1,7 +1,6 @@ import discord from discord import app_commands from discord.ext import commands -from discord.ext.commands import Context def kick_command(): @@ -142,7 +141,7 @@ def kick_command(): ) await context.send(embed=embed, ephemeral=True) - except Exception as e: + except Exception: embed = discord.Embed( title="Error!", description="An unexpected error occurred.", diff --git a/cogs/moderation/nick.py b/cogs/moderation/nick.py index ff9b268..069efdc 100644 --- a/cogs/moderation/nick.py +++ b/cogs/moderation/nick.py @@ -1,7 +1,6 @@ import discord from discord import app_commands from discord.ext import commands -from discord.ext.commands import Context def nick_command(): diff --git a/cogs/moderation/purge.py b/cogs/moderation/purge.py index dd9a9bc..01734d4 100644 --- a/cogs/moderation/purge.py +++ b/cogs/moderation/purge.py @@ -1,7 +1,6 @@ import discord from discord import app_commands from discord.ext import commands -from discord.ext.commands import Context def purge_command(): diff --git a/cogs/owner/logs.py b/cogs/owner/logs.py index 6758b20..a012953 100644 --- a/cogs/owner/logs.py +++ b/cogs/owner/logs.py @@ -92,7 +92,7 @@ class Logs(commands.Cog, name="logs"): selected_lines = all_lines[-lines:] if len(all_lines) > lines else all_lines log_content = "".join(selected_lines) - log_file = f"logs.txt" + log_file = "logs.txt" with open(log_file, "w", encoding="utf-8") as f: f.write( f"Bot logs extracted at {discord.utils.utcnow().strftime('%Y-%m-%d %H:%M:%S')} UTC\n" diff --git a/cogs/sidestore/afc.py b/cogs/sidestore/afc.py index de043a2..8129b6b 100644 --- a/cogs/sidestore/afc.py +++ b/cogs/sidestore/afc.py @@ -1,8 +1,5 @@ import discord -from discord import app_commands from discord.ext import commands -from discord.ext.commands import Context -import time def afc_command(): @@ -23,7 +20,7 @@ def afc_command(): name="SideStore", icon_url="https://github.com/SideStore/assets/blob/main/icons/classic/Default.png?raw=true", ) - embed.set_footer(text=f"Last Edited by CelloSerenity") + embed.set_footer(text="Last Edited by CelloSerenity") embed.timestamp = discord.utils.utcnow() view = discord.ui.View() diff --git a/cogs/sidestore/code.py b/cogs/sidestore/code.py index f33d26a..307c7d1 100644 --- a/cogs/sidestore/code.py +++ b/cogs/sidestore/code.py @@ -1,8 +1,5 @@ import discord -from discord import app_commands from discord.ext import commands -from discord.ext.commands import Context -import time def code_command(): @@ -34,7 +31,7 @@ def code_command(): name="SideStore", icon_url="https://github.com/SideStore/assets/blob/main/icons/classic/Default.png?raw=true", ) - embed.set_footer(text=f"Last Edited by CelloSerenity") + embed.set_footer(text="Last Edited by CelloSerenity") embed.timestamp = discord.utils.utcnow() view = discord.ui.View() diff --git a/cogs/sidestore/crash.py b/cogs/sidestore/crash.py index a902f54..b332b77 100644 --- a/cogs/sidestore/crash.py +++ b/cogs/sidestore/crash.py @@ -1,8 +1,5 @@ import discord -from discord import app_commands from discord.ext import commands -from discord.ext.commands import Context -import time def crash_command(): @@ -28,7 +25,7 @@ def crash_command(): name="SideStore", icon_url="https://github.com/SideStore/assets/blob/main/icons/classic/Default.png?raw=true", ) - embed.set_footer(text=f"Last Edited by CelloSerenity") + embed.set_footer(text="Last Edited by CelloSerenity") embed.timestamp = discord.utils.utcnow() view = discord.ui.View() diff --git a/cogs/sidestore/half.py b/cogs/sidestore/half.py index 90e8d1f..d2584e2 100644 --- a/cogs/sidestore/half.py +++ b/cogs/sidestore/half.py @@ -1,8 +1,5 @@ import discord -from discord import app_commands from discord.ext import commands -from discord.ext.commands import Context -import time def half_command(): @@ -29,7 +26,7 @@ def half_command(): name="SideStore", icon_url="https://github.com/SideStore/assets/blob/main/icons/classic/Default.png?raw=true", ) - embed.set_footer(text=f"Last Edited by CelloSerenity") + embed.set_footer(text="Last Edited by CelloSerenity") embed.timestamp = discord.utils.utcnow() view = discord.ui.View() diff --git a/cogs/sidestore/pairing.py b/cogs/sidestore/pairing.py index afc31ac..75868ae 100644 --- a/cogs/sidestore/pairing.py +++ b/cogs/sidestore/pairing.py @@ -1,8 +1,5 @@ import discord -from discord import app_commands from discord.ext import commands -from discord.ext.commands import Context -import time def pairing_command(): @@ -34,7 +31,7 @@ def pairing_command(): name="SideStore", icon_url="https://github.com/SideStore/assets/blob/main/icons/classic/Default.png?raw=true", ) - embed.set_footer(text=f"Last Edited by CelloSerenity") + embed.set_footer(text="Last Edited by CelloSerenity") embed.timestamp = discord.utils.utcnow() view = discord.ui.View() diff --git a/cogs/sidestore/refresh.py b/cogs/sidestore/refresh.py index 016595f..60e05b6 100644 --- a/cogs/sidestore/refresh.py +++ b/cogs/sidestore/refresh.py @@ -1,8 +1,5 @@ import discord -from discord import app_commands from discord.ext import commands -from discord.ext.commands import Context -import time def refresh_command(): @@ -24,7 +21,7 @@ def refresh_command(): name="SideStore", icon_url="https://github.com/SideStore/assets/blob/main/icons/classic/Default.png?raw=true", ) - embed.set_footer(text=f"Last Edited by neoarz") + embed.set_footer(text="Last Edited by neoarz") embed.timestamp = discord.utils.utcnow() view = discord.ui.View() diff --git a/cogs/sidestore/server.py b/cogs/sidestore/server.py index ba80685..d8e7c9f 100644 --- a/cogs/sidestore/server.py +++ b/cogs/sidestore/server.py @@ -1,8 +1,5 @@ import discord -from discord import app_commands from discord.ext import commands -from discord.ext.commands import Context -import time def server_command(): @@ -28,7 +25,7 @@ def server_command(): name="SideStore", icon_url="https://github.com/SideStore/assets/blob/main/icons/classic/Default.png?raw=true", ) - embed.set_footer(text=f"Last Edited by CelloSerenity") + embed.set_footer(text="Last Edited by CelloSerenity") embed.timestamp = discord.utils.utcnow() view = discord.ui.View() diff --git a/cogs/sidestore/sidestore.py b/cogs/sidestore/sidestore.py index 6d9676d..e18de16 100644 --- a/cogs/sidestore/sidestore.py +++ b/cogs/sidestore/sidestore.py @@ -1,8 +1,5 @@ import discord -from discord import app_commands from discord.ext import commands -from discord.ext.commands import Context -import time class SidestoreSelect(discord.ui.Select): diff --git a/cogs/sidestore/sparse.py b/cogs/sidestore/sparse.py index 1735322..d755dee 100644 --- a/cogs/sidestore/sparse.py +++ b/cogs/sidestore/sparse.py @@ -1,8 +1,5 @@ import discord -from discord import app_commands from discord.ext import commands -from discord.ext.commands import Context -import time def sparse_command(): @@ -23,7 +20,7 @@ def sparse_command(): name="SideStore", icon_url="https://github.com/SideStore/assets/blob/main/icons/classic/Default.png?raw=true", ) - embed.set_footer(text=f"Last Edited by neoarz") + embed.set_footer(text="Last Edited by neoarz") embed.timestamp = discord.utils.utcnow() view = discord.ui.View() diff --git a/cogs/sidestore/udid.py b/cogs/sidestore/udid.py index 1d9a024..7d3a42f 100644 --- a/cogs/sidestore/udid.py +++ b/cogs/sidestore/udid.py @@ -1,8 +1,5 @@ import discord -from discord import app_commands from discord.ext import commands -from discord.ext.commands import Context -import time def udid_command(): @@ -22,7 +19,7 @@ def udid_command(): name="SideStore", icon_url="https://github.com/SideStore/assets/blob/main/icons/classic/Default.png?raw=true", ) - embed.set_footer(text=f"Last Edited by CelloSerenity") + embed.set_footer(text="Last Edited by CelloSerenity") embed.timestamp = discord.utils.utcnow() view = discord.ui.View() diff --git a/cogs/utilities/codepreview.py b/cogs/utilities/codepreview.py index 7a56332..cb5e96c 100644 --- a/cogs/utilities/codepreview.py +++ b/cogs/utilities/codepreview.py @@ -1,10 +1,8 @@ import discord from discord import app_commands from discord.ext import commands -from discord.ext.commands import Context import aiohttp import re -import json def codepreview_command(): diff --git a/cogs/utilities/dictionary.py b/cogs/utilities/dictionary.py index feaf37a..67568a4 100644 --- a/cogs/utilities/dictionary.py +++ b/cogs/utilities/dictionary.py @@ -1,7 +1,6 @@ import discord from discord import app_commands from discord.ext import commands -from discord.ext.commands import Context import aiohttp @@ -38,7 +37,7 @@ def dictionary_command(): } except aiohttp.ClientError: return {"success": False, "error": "Network error occurred"} - except Exception as e: + except Exception: return {"success": False, "error": "An unexpected error occurred"} @commands.hybrid_command( @@ -124,7 +123,7 @@ def dictionary_command(): meanings = entry.get("meanings", []) embed = discord.Embed( - title=f"Dictionary", + title="Dictionary", description=f"**```{word_title}```**", color=0x7289DA, ) diff --git a/cogs/utilities/translate.py b/cogs/utilities/translate.py index ecf30e4..4b25d0c 100644 --- a/cogs/utilities/translate.py +++ b/cogs/utilities/translate.py @@ -1,12 +1,9 @@ import discord from discord import app_commands from discord.ext import commands -from discord.ext.commands import Context import aiohttp -import asyncio import re import json -import urllib.parse languages = { diff --git a/utils/ascii_art.py b/utils/ascii_art.py index 365c9be..43faf25 100644 --- a/utils/ascii_art.py +++ b/utils/ascii_art.py @@ -1,7 +1,6 @@ #!/usr/bin/env python3 # From https://github.com/neoarz/Velora/blob/main/Velora/ui/ascii.py -import math def gradient_text(text, start_color, end_color):