@@ -46,17 +46,15 @@ def __init__(
4646 original_author : Union [discord .Member , discord .User ],
4747 suggestion : str ,
4848 webhook : discord .Webhook ,
49- message : discord .Message | discord .WebhookMessage | None = None ,
5049 ) -> None :
5150 super ().__init__ ()
5251 self .original_author = original_author
5352 self .suggestion = suggestion
5453 self .webhook = webhook
55- self .message = message
5654
5755 self .add_option (label = "Guild" , value = "1" , description = "This suggestion applies to the guild." , emoji = "\U0001f4c1 " )
5856 self .add_option (
59- label = "Pythonistabot " , value = "2" , description = "This suggestion applies to Pythonistabot ." , emoji = "\U0001f916 "
57+ label = "PythonistaBot " , value = "2" , description = "This suggestion applies to PythonistaBot ." , emoji = "\U0001f916 "
6058 )
6159 self .add_option (
6260 label = "TwitchIO" ,
@@ -85,8 +83,6 @@ async def callback(self, interaction: discord.Interaction) -> None:
8583 embed .set_author (name = author .name , icon_url = author .display_avatar )
8684 embed .set_footer (text = f"Suggestion sent by { author } (ID: { author .id } )" )
8785 await self .webhook .send (embed = embed , avatar_url = author .display_avatar , username = author .name )
88- if self .message :
89- await self .message .delete ()
9086
9187
9288class TypeView (ui .View ):
@@ -97,9 +93,7 @@ def __init__(
9793 ) -> None :
9894 super ().__init__ (timeout = 180 )
9995 self .original_author = original_author
100- self .add_item (
101- TypeSelect (original_author = original_author , suggestion = suggestion , webhook = webhook , message = self .message )
102- )
96+ self .add_item (TypeSelect (original_author = original_author , suggestion = suggestion , webhook = webhook ))
10397
10498 async def on_timeout (self ) -> None :
10599 await self .message .delete ()
0 commit comments