Skip to content

Commit

Permalink
👻 Add G-HOOOOST
Browse files Browse the repository at this point in the history
  • Loading branch information
ender committed Apr 17, 2024
1 parent 885b607 commit 34c2c75
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
4 changes: 2 additions & 2 deletions extensions/events/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))

6 changes: 3 additions & 3 deletions extensions/events/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
return await ctx.reply(embed=embed)
14 changes: 14 additions & 0 deletions extensions/events/ghost.py
Original file line number Diff line number Diff line change
@@ -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>")

0 comments on commit 34c2c75

Please sign in to comment.