From 2eb4b738be7bb8a31a3392b8282c384e0fcda062 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Fri, 1 Sep 2023 19:37:50 -0400 Subject: [PATCH] feat(forums): introduced the forums cog --- forums/__init__.py | 5 +++++ forums/forums.py | 24 ++++++++++++++++++++++++ forums/info.json | 8 ++++++++ galaxy/temp.py | 0 4 files changed, 37 insertions(+) create mode 100644 forums/__init__.py create mode 100644 forums/forums.py create mode 100644 forums/info.json delete mode 100644 galaxy/temp.py diff --git a/forums/__init__.py b/forums/__init__.py new file mode 100644 index 0000000..50b0e24 --- /dev/null +++ b/forums/__init__.py @@ -0,0 +1,5 @@ +from .forums import Forums + + +async def setup(bot): + await bot.add_cog(Forums(bot)) diff --git a/forums/forums.py b/forums/forums.py new file mode 100644 index 0000000..38d294e --- /dev/null +++ b/forums/forums.py @@ -0,0 +1,24 @@ +import discord +from redbot.core import Config, checks, commands +from redbot.core.app_commands import Choice + + +class Forums(commands.Cog): + """Custom cog intended for use on the Galaxy discord server. + Developed by SeaswimmerTheFsh.""" + + def __init__(self, bot): + self.bot = bot + self.config = Config.get_conf(self, identifier=2352711325) + self.config.register_guild( + request_roles = [] + ) + + async def resolved(self, ctx: commands.Context): + """Marks a thread as resolved.""" + channel = ctx.channel + if not isinstance(channel, discord.Thread): + await ctx.message.add_reaction("❌") + return + else: + await ctx.message.add_reaction("✅") diff --git a/forums/info.json b/forums/info.json new file mode 100644 index 0000000..5b1a7c5 --- /dev/null +++ b/forums/info.json @@ -0,0 +1,8 @@ +{ + "author" : ["SeaswimmerTheFsh"], + "install_msg" : "Thank you for installing Forums!\nYou can find the source code of this cog here: https://git.seaswimmer.cc/SeaswimmerTheFsh/GalaxyCogs", + "name" : "Forums", + "short" : "Custom cog intended for use on the Galaxy discord server.", + "description" : "Custom cog intended for use on the Galaxy discord server.", + "end_user_data_statement" : "This cog does not store any End User Data." +} diff --git a/galaxy/temp.py b/galaxy/temp.py deleted file mode 100644 index e69de29..0000000