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

45 lines
1.6 KiB
Python
Raw Normal View History

feat: Add new files guild.py, message.py, thread.py in tmp directory for event handling refactor: Move event handling code from tux/cogs/events to tmp directory for better organization fix: Comment out listeners in new files for testing purposes chore: Delete old files guild.py, member.py, message.py in tux/cogs/events as they are no longer needed chore: remove thread.py due to redundancy and lack of use feat(logging/commands.py): add new CommandEventsCog to log command usage for better tracking and debugging feat(logging): add guild logging functionality to track changes in guild This commit introduces a new file, guild.py, which contains a GuildLogging class. This class provides various listeners to track changes in the guild such as channel creation/deletion/update, guild update, emojis update, integration create/update/delete, role create/delete/update, scheduled event create/delete/update, stage instance create/delete/update, and thread create/delete/update. The changes are sent to an audit log channel. feat(logging): add new logging cogs for member, mod, and voice events This commit introduces three new cogs for logging different types of events. The MemberLogging cog logs events related to members such as joining, leaving, and updates. The ModLogging cog logs events related to moderation such as creation, update, and deletion of automod rules, as well as member bans and unbans. The VoiceLogging cog logs events related to voice channels such as voice state updates. These new cogs will help in tracking and auditing activities in the server.
2024-04-09 07:26:47 +00:00
from discord.ext import commands
class ThreadEventsCog(commands.Cog, name="Thread Events Handler"):
def __init__(self, bot: commands.Bot) -> None:
self.bot = bot
# @commands.Cog.listener()
# async def on_thread_create(self, thread: discord.Thread) -> None:
# logger.trace(f"{thread} has been created.")
# @commands.Cog.listener()
# async def on_thread_delete(self, thread: discord.Thread) -> None:
# logger.trace(f"{thread} has been deleted.")
# @commands.Cog.listener()
# async def on_thread_remove(self, thread: discord.Thread) -> None:
# logger.trace(f"{thread} has been removed.")
# @commands.Cog.listener()
# async def on_thread_update(self, before: discord.Thread, after: discord.Thread) -> None:
# logger.trace(f"Thread updated: {before} -> {after}")
# @commands.Cog.listener()
# async def on_thread_join(self, thread: discord.Thread) -> None:
# logger.trace(f"{thread} has been joined.")
# @commands.Cog.listener()
# async def on_thread_member_join(self, member: discord.ThreadMember) -> None:
# logger.trace(f"Member {member} joined the thread.")
# @commands.Cog.listener()
# async def on_thread_member_remove(self, member: discord.ThreadMember) -> None:
# logger.trace(f"Member {member} left the thread.")
# @commands.Cog.listener()
# async def on_thread_member_update(
# self, before: discord.ThreadMember, after: discord.ThreadMember
# ) -> None:
# logger.trace(f"Thread member updated: {before} -> {after}")
async def setup(bot: commands.Bot) -> None:
await bot.add_cog(ThreadEventsCog(bot))