From 34c2c75bf55d4bd35fed78d3ad4d897fe18922b4 Mon Sep 17 00:00:00 2001 From: ender Date: Wed, 17 Apr 2024 20:59:42 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=BB=20Add=20G-HOOOOST?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/events/__init__.py | 4 ++-- extensions/events/errors.py | 6 +++--- extensions/events/ghost.py | 14 ++++++++++++++ 3 files changed, 19 insertions(+), 5 deletions(-) create mode 100644 extensions/events/ghost.py diff --git a/extensions/events/__init__.py b/extensions/events/__init__.py index 5792ebc..dbbeb69 100644 --- a/extensions/events/__init__.py +++ b/extensions/events/__init__.py @@ -2,12 +2,12 @@ from .ping import PingCog from .avatars import AvatarsCog from .errors import ErrorsCog +from .ghost import GhostCog -class Events(AvatarsCog, PingCog, GuildCog, ErrorsCog): # PingCog needs to be first, it adds attributes +class Events(AvatarsCog, PingCog, GuildCog, ErrorsCog, GhostCog): # PingCog needs to be first, it adds attributes pass async def setup(bot): await bot.add_cog(Events(bot)) - \ No newline at end of file diff --git a/extensions/events/errors.py b/extensions/events/errors.py index 1050508..fede602 100644 --- a/extensions/events/errors.py +++ b/extensions/events/errors.py @@ -14,12 +14,12 @@ class ErrorsCog(Cog): async def on_command_error(self, ctx, error: Exception): if isinstance(error, commands.CommandNotFound): return - + await ctx.message.add_reaction("❌") if reason := errors.get(type(error)): embed = Embed(title="an oopsie boopsie hoopsie happened !!!!", description=reason.format(self=self, error=error)) return await ctx.reply(embed=embed) - + embed = Embed(title="i dunno what to tell you m8", description=f"```prolog\n{error}\n```") - return await ctx.reply(embed=embed) \ No newline at end of file + return await ctx.reply(embed=embed) diff --git a/extensions/events/ghost.py b/extensions/events/ghost.py new file mode 100644 index 0000000..bfb753d --- /dev/null +++ b/extensions/events/ghost.py @@ -0,0 +1,14 @@ +import discord +from discord.ext import commands + +from utils import Cog + + +class GhostCog(Cog): + @commands.Cog.listener("on_message") + async def ghost(self, message: discord.Message): + if message.author.bot: + return + + if message.content.lower() == "<:ghoost:1228090615510732850>": + return await message.reply("G-HOOOOOOST <:ghoost:1228090615510732850>")