Skip to content

New link for !prse command; fix !mock not working on replies #110

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions cogs/fun.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
6 changes: 3 additions & 3 deletions cogs/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
"""
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down