From 5f43eb092b7c681451fab0ffab6d530ebecca9bd Mon Sep 17 00:00:00 2001 From: Daniel Ellingson Date: Mon, 17 Apr 2023 13:57:44 -0700 Subject: [PATCH 1/3] Use new fancy link embedding for !prse command Changes some verbiage. --- cogs/info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cogs/info.py b/cogs/info.py index 71d0df3..392d266 100755 --- a/cogs/info.py +++ b/cogs/info.py @@ -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() From 7458f60cef4c4c47bf9f660b5bfdb89f74d3e93b Mon Sep 17 00:00:00 2001 From: ZenKitty <55564683+ZenKitty@users.noreply.github.com> Date: Fri, 15 Sep 2023 09:50:19 -0700 Subject: [PATCH 2/3] rename classes command Reduces confusion --- cogs/info.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cogs/info.py b/cogs/info.py index 71d0df3..fc40898 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 From 24f8838640c0ae140b093b9eb7970da10bbe7096 Mon Sep 17 00:00:00 2001 From: Asterisk007 Date: Sat, 16 Sep 2023 21:15:42 -0700 Subject: [PATCH 3/3] Fix for !mock not working with replies --- cogs/fun.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) 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()