aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Diabolical5777 <[email protected]>2022-08-30 16:49:30 +0400
committerGravatar Diabolical5777 <[email protected]>2022-08-30 16:49:30 +0400
commitfa2e9db790ace1a7269f04d36e418031adec0014 (patch)
treeb029a748bba35b1f409e6ab2bc6ec60fd523ff91
parentUse buttons for bookmark command (diff)
Use buttons for bookmark command
-rw-r--r--bot/exts/utilities/bookmark.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/bot/exts/utilities/bookmark.py b/bot/exts/utilities/bookmark.py
index 3c57aa09..c8049783 100644
--- a/bot/exts/utilities/bookmark.py
+++ b/bot/exts/utilities/bookmark.py
@@ -48,12 +48,11 @@ class SendBookmark(discord.ui.View):
):
super().__init__()
- self.bookmark_function = bookmark_function # The function is the 'action_bookmark'
+ self.bookmark_function = bookmark_function # The function is the 'action_bookmark'
self.clicked: list[int] = [author.id]
self.channel = channel
self.target_message = target_message
-
@discord.ui.button(label="Receive Bookmark", style=discord.ButtonStyle.green)
async def button_callback(self, button: discord.Button, interaction: discord.Interaction) -> None:
"""The button callback."""
@@ -169,7 +168,7 @@ class Bookmark(commands.Cog):
await self.action_bookmark(ctx.channel, ctx.author, target_message, title)
view = SendBookmark(self.action_bookmark, ctx.author, ctx.channel, target_message)
-
+
embed = self.create_button_embed(target_message)
await ctx.send(embed=embed, view=view)