diff options
author | Arjun Satarkar <me@arjunsatarkar.net> | 2023-12-25 13:25:09 +0000 |
---|---|---|
committer | Arjun Satarkar <me@arjunsatarkar.net> | 2023-12-25 13:25:09 +0000 |
commit | 84f45dc19ae66555da6c378dc41b1182fb2fb2f6 (patch) | |
tree | 8dd25d2808e1644e04ece07b880bbdeb2473c1e0 /question_of_the_day/question_of_the_day.py | |
parent | f6716a5a46292e6adec4f31e2a8641f8cdbab8b5 (diff) | |
download | aps-cogs-84f45dc19ae66555da6c378dc41b1182fb2fb2f6.tar aps-cogs-84f45dc19ae66555da6c378dc41b1182fb2fb2f6.tar.gz aps-cogs-84f45dc19ae66555da6c378dc41b1182fb2fb2f6.zip |
question_of_the_day: fix unpin breaking if the message was deleted
Diffstat (limited to 'question_of_the_day/question_of_the_day.py')
-rw-r--r-- | question_of_the_day/question_of_the_day.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/question_of_the_day/question_of_the_day.py b/question_of_the_day/question_of_the_day.py index 3f7971e..391352b 100644 --- a/question_of_the_day/question_of_the_day.py +++ b/question_of_the_day/question_of_the_day.py @@ -399,10 +399,10 @@ class QuestionOfTheDay(commands.Cog): channel = await guild.fetch_channel( latest_qotd_message_info["channel_id"] ) - old_message = await channel.fetch_message( - latest_qotd_message_info["message_id"] - ) try: + old_message = await channel.fetch_message( + latest_qotd_message_info["message_id"] + ) await old_message.unpin(reason="Unpinning old question of the day.") except (discord.Forbidden, discord.NotFound): pass |