1
Fork 0
mirror of https://github.com/allthingslinux/tux.git synced 2024-10-02 16:43:12 +00:00

[Fix] pyproject.toml refractoring

This commit is contained in:
ExploitDemon 2024-01-08 19:01:17 -07:00
parent 051f461aec
commit e5c905a024
18 changed files with 72 additions and 56 deletions

View file

@ -87,7 +87,6 @@ target-version = "py311"
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
# McCabe complexity (`C901`) by default.
ignore = []
select = [
# pycodestyle
"E",
@ -102,6 +101,8 @@ select = [
# isort
"I",
]
ignore = ["E501"]
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
@ -147,7 +148,7 @@ docstring-code-line-length = "dynamic"
################################################################
[tool.pyright]
defineConstant = {DEBUG = true}
defineConstant = { DEBUG = true }
exclude = [
".direnv",

View file

@ -1,6 +1,7 @@
# on_bulk_message_delete.py
import discord
from discord.ext import commands
from tux.utils.tux_logger import TuxLogger
logger = TuxLogger(__name__)

View file

@ -1,6 +1,7 @@
# on_guild_channel_create.py
import discord
from discord.ext import commands
from tux.utils.tux_logger import TuxLogger
logger = TuxLogger(__name__)

View file

@ -1,6 +1,7 @@
# on_guild_channel_delete.py
import discord
from discord.ext import commands
from tux.utils.tux_logger import TuxLogger
logger = TuxLogger(__name__)

View file

@ -3,6 +3,7 @@ from datetime import datetime
import discord
from discord.ext import commands
from tux.utils.tux_logger import TuxLogger
logger = TuxLogger(__name__)

View file

@ -1,6 +1,7 @@
# on_guild_channel_update.py
import discord
from discord.ext import commands
from tux.utils.tux_logger import TuxLogger
logger = TuxLogger(__name__)

View file

@ -1,6 +1,7 @@
# on_guild_role_create.py
import discord
from discord.ext import commands
from tux.utils.tux_logger import TuxLogger
logger = TuxLogger(__name__)

View file

@ -1,6 +1,7 @@
# on_guild_role_delete.py
import discord
from discord.ext import commands
from tux.utils.tux_logger import TuxLogger
logger = TuxLogger(__name__)

View file

@ -1,6 +1,7 @@
# on_guild_role_update.py
import discord
from discord.ext import commands
from tux.utils.tux_logger import TuxLogger
logger = TuxLogger(__name__)

View file

@ -1,6 +1,7 @@
# on_member_ban.py
import discord
from discord.ext import commands
from tux.utils.tux_logger import TuxLogger
logger = TuxLogger(__name__)

View file

@ -1,6 +1,7 @@
# on_member_join.py
import discord
from discord.ext import commands
from tux.utils.tux_logger import TuxLogger
logger = TuxLogger(__name__)

View file

@ -1,6 +1,7 @@
# on_member_remove.py
import discord
from discord.ext import commands
from tux.utils.tux_logger import TuxLogger
logger = TuxLogger(__name__)

View file

@ -1,6 +1,7 @@
# on_member_unban.py
import discord
from discord.ext import commands
from tux.utils.tux_logger import TuxLogger
logger = TuxLogger(__name__)

View file

@ -1,6 +1,7 @@
# Import the necessary modules
import discord
from discord.ext import commands
from tux.utils.tux_logger import TuxLogger
# Initialize the logger
@ -72,7 +73,7 @@ class OnMemberUpdate(commands.Cog):
The channel ID needs to be replaced with the actual ID of the channel you want to send the embed to.
"""
some_channel = self.bot.get_channel(
channel_id
"1191472088695980083"
) # Replace 'channel_id' with the actual ID
await some_channel.send(embed=embed)

View file

@ -1,6 +1,7 @@
# on_message.py
import discord
from discord.ext import commands
from tux.utils.tux_logger import TuxLogger
logger = TuxLogger(__name__)

View file

@ -1,6 +1,7 @@
# on_message_delete.py
import discord
from discord.ext import commands
from tux.utils.tux_logger import TuxLogger
logger = TuxLogger(__name__)

View file

@ -1,6 +1,7 @@
# on_message_edit.py
import discord
from discord.ext import commands
from tux.utils.tux_logger import TuxLogger
logger = TuxLogger(__name__)

View file

@ -3,15 +3,14 @@ import os
import discord
from cog_loader import CogLoader
from discord.ext import commands
from dotenv import load_dotenv
from utils.error_handler import ErrorHandler
from utils.tux_logger import TuxLogger
logger = TuxLogger(__name__)
load_dotenv()
from discord.ext import commands
from utils.error_handler import ErrorHandler
async def setup(bot: commands.Bot, debug: bool = False):
"""
@ -99,7 +98,7 @@ async def main():
logger.info(f"{bot.user} has connected to Discord!", __name__)
await bot.start(os.getenv("TOKEN") or "", reconnect=True)
except Exception as e:
except Exception:
logger.error("An error occurred:", exc_info=True)