diff --git a/cogs/fun.py b/cogs/fun.py index 3263240..8f1d1d9 100755 --- a/cogs/fun.py +++ b/cogs/fun.py @@ -264,8 +264,20 @@ async def mock(self, ctx): argIsText = True if not mock_has_text: - prev_message = await channel.history(limit=2).flatten() - message_text = prev_message[1].content.lower() + if ctx.message.reference != None: + prev_message = ctx.message.reference.resolved + if prev_message != None: + if prev_message.content != None: + message_text = prev_message.content.lower() + else: + await ctx.message.reply("Sorry, I couldn't get the post you're replying to. Maybe it got deleted? 🤷‍♂️") + return + else: + await ctx.message.reply("Sorry, I couldn't get the post you're replying to. Maybe it got deleted? 🤷‍♂️") + return + else: + prev_message = await channel.history(limit=2).flatten() + message_text = prev_message[1].content.lower() elif not argIsText: message_text = await channel.fetch_message(msg_id) message_text = message_text.content.lower() diff --git a/cogs/info.py b/cogs/info.py index 71d0df3..c2b0043 100755 --- a/cogs/info.py +++ b/cogs/info.py @@ -150,7 +150,7 @@ def sll(self, js, loc): @commands.command() - async def classes(self, ctx, class_name="CSCI-111"): + async def schedule(self, ctx, class_name="CSCI-111"): """ Will query CSU Chico's Class schedule to show info about classes. Format: 'CSCI-111' or 'cins_465' """ @@ -206,7 +206,7 @@ async def classes(self, ctx, class_name="CSCI-111"): def get_term(self, mod): """ - Used for the classes command, uses current date to determine the term number to be + Used for the schedule command, uses current date to determine the term number to be used in parameters """ # Mod can be used to change the relative term. Don't have the energy currently to implement @@ -265,7 +265,7 @@ async def prse(self, ctx): """ because of course we need a !prse command """ - await ctx.send("PReSEnting: https://github.com/Asterisk007/prse\n[This programming language is not endorsed by the University, nor this Discord server.]") + await ctx.send("[PRSE: It's a language, barely.](https://github.com/Asterisk007/prse)") # detect stock tickers and display their current price @commands.Cog.listener()