From a8f3afc4d6608bf5d2b170ab22c83a2ee41fa664 Mon Sep 17 00:00:00 2001 From: Arjun Satarkar Date: Fri, 22 Dec 2023 20:08:46 +0530 Subject: question_of_the_day: remove redundant code --- question_of_the_day/question_of_the_day.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'question_of_the_day/question_of_the_day.py') 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] -- cgit v1.2.3-57-g22cb