Skip to content

Commit

Permalink
[Discord] Remove now unnecessary message fetch in search subcommand
Browse files Browse the repository at this point in the history
Remove now unnecessary message fetch in search wikipedia command
  • Loading branch information
Harmon758 committed Nov 21, 2023
1 parent 2a9513a commit 25be1c4
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions Discord/cogs/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,16 +519,11 @@ async def search_wikipedia(self, ctx, *, query: str):
return

view = WikiArticlesView(articles)
message = await ctx.reply(
view.message = await ctx.reply(
"",
embed = await view.initial_embed(ctx),
view = view
)

if ctx.interaction:
# Fetch Message, as InteractionMessage token expires after 15 min.
message = await message.fetch()
view.message = message
ctx.bot.views.append(view)

@app_commands.command(name = "wikipedia")
Expand Down

0 comments on commit 25be1c4

Please sign in to comment.