1+ from __future__ import annotations
2+
13import discord
2- import typing
34from discord .ext import commands
45
56
@@ -26,11 +27,13 @@ def __init__(self, *,
2627 PreviousButton : discord .ui .Button = discord .ui .Button (emoji = discord .PartialEmoji (name = "\U000025c0 " )),
2728 NextButton : discord .ui .Button = discord .ui .Button (emoji = discord .PartialEmoji (name = "\U000025b6 " )),
2829 PageCounterStyle : discord .ButtonStyle = discord .ButtonStyle .grey ,
29- InitialPage : int = 0 ) -> None :
30+ InitialPage : int = 0 ,
31+ ephemeral : bool = False ) -> None :
3032 self .PreviousButton = PreviousButton
3133 self .NextButton = NextButton
3234 self .PageCounterStyle = PageCounterStyle
3335 self .InitialPage = InitialPage
36+ self .ephemeral = ephemeral
3437
3538 self .pages = None
3639 self .ctx = None
@@ -41,7 +44,7 @@ def __init__(self, *,
4144
4245 super ().__init__ (timeout = timeout )
4346
44- async def start (self , ctx : typing . Union [ discord .Interaction , commands .Context ] , pages : list [discord .Embed ], ** kwargs ):
47+ async def start (self , ctx : discord .Interaction | commands .Context , pages : list [discord .Embed ]):
4548
4649 if isinstance (ctx , discord .Interaction ):
4750 ctx = await commands .Context .from_interaction (ctx )
@@ -62,7 +65,7 @@ async def start(self, ctx: typing.Union[discord.Interaction, commands.Context],
6265 self .add_item (self .page_counter )
6366 self .add_item (self .NextButton )
6467
65- self .message = await ctx .send (embed = self .pages [self .InitialPage ], view = self , ** kwargs )
68+ self .message = await ctx .send (embed = self .pages [self .InitialPage ], view = self , ephemeral = self . ephemeral )
6669
6770 async def previous (self ):
6871 if self .current_page == 0 :
0 commit comments