diff options
| -rw-r--r-- | bigresult.py | 5 | ||||
| -rw-r--r-- | config/assets.py | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/bigresult.py b/bigresult.py index 7b59a75..48b5c6b 100644 --- a/bigresult.py +++ b/bigresult.py @@ -7,6 +7,8 @@ import time from functools import partial, wraps # from commands.funny import BigCommands import re +import config.assets +from config.assets import ImageManager ANGGY = re.compile(r'.*((are)|(is))(( so)|( really))? mad.*') ANGGY1 = re.compile(r'.*you are(( so)|( really))? mad.*') @@ -26,6 +28,7 @@ class BigResultPlus(commands.Bot): "ivotedfor": BigResultPlus.voot, "xyr0m": BigResultPlus.xyr0m } + self.Imagemanager = ImageManager() # intents = discord.Intents.all() # self.client = commands.Bot(intents=intents, command_prefix="!") # This represents our connection with Discord @@ -34,7 +37,7 @@ class BigResultPlus(commands.Bot): super().command(name=key)(wraps(self.COMMANDS[key])(partial(self.COMMANDS[key], self))) async def xyr0m(self, ctx): - await ctx.reply("RAID INITIATED BY XYR0M\nhttps://discord.gg/cocksuckersRus\nI am extremely homosexual") + await ctx.reply("RAID INITIATED BY XYR0M\nhttps://discord.gg/cocksuckersRus\nI am extremely homosexual", file=self.Imagemanager.get_image_fp("XYR0M")) pass diff --git a/config/assets.py b/config/assets.py index 15568ce..d89fc48 100644 --- a/config/assets.py +++ b/config/assets.py @@ -7,8 +7,8 @@ class ImageManager: def get_image_fp(self, img_name = "") -> discord.File | None: res = None try: - image_handler = open(f"config/{img_name}.jpg", "rb") - res = discord.File(fp=image_handler, filename=img_name) + image_handler = open(f"assets/{img_name}.jpg", "rb") + res = discord.File(fp=image_handler, filename=f"{img_name}.jpg") except FileNotFoundError: print("Image not found in assets directory") return res
\ No newline at end of file |
