aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArjun Satarkar <me@arjunsatarkar.net>2023-12-22 14:38:46 +0000
committerArjun Satarkar <me@arjunsatarkar.net>2023-12-22 14:38:46 +0000
commita8f3afc4d6608bf5d2b170ab22c83a2ee41fa664 (patch)
treeae18072f93676f4c9ad6d5634a1e169956edb520
parent11fc12e819e5f565d3c996b7de6bf22b6b2bd52c (diff)
downloadaps-cogs-a8f3afc4d6608bf5d2b170ab22c83a2ee41fa664.tar
aps-cogs-a8f3afc4d6608bf5d2b170ab22c83a2ee41fa664.tar.gz
aps-cogs-a8f3afc4d6608bf5d2b170ab22c83a2ee41fa664.zip
question_of_the_day: remove redundant code
-rw-r--r--question_of_the_day/question_of_the_day.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/question_of_the_day/question_of_the_day.py b/question_of_the_day/question_of_the_day.py
index bda4dc9..be32869 100644
--- a/question_of_the_day/question_of_the_day.py
+++ b/question_of_the_day/question_of_the_day.py
@@ -328,15 +328,11 @@ class QuestionOfTheDay(commands.Cog):
question_index = random.randrange(0, questions_len)
question = questions[question_index]
- asked_by = await guild.fetch_member(question["asked_by"])
- allowed_mentions = discord.AllowedMentions.none()
- allowed_mentions.users = [asked_by]
-
embed = discord.Embed(
description=question["question"]
+ "\n"
+ redbot.core.utils.chat_formatting.italics(
- "asked by " + asked_by.mention
+ "asked by " + (await guild.fetch_member(question["asked_by"])).mention
)
)
embed.set_author(
@@ -360,7 +356,7 @@ class QuestionOfTheDay(commands.Cog):
redbot.core.data_manager.bundled_data_path(self) / ICON_PATH,
ICON_PATH.name,
),
- allowed_mentions=allowed_mentions,
+ allowed_mentions=discord.AllowedMentions.none(),
)
del questions[question_index]