@@ -46,17 +46,15 @@ def __init__(
46
46
original_author : Union [discord .Member , discord .User ],
47
47
suggestion : str ,
48
48
webhook : discord .Webhook ,
49
- message : discord .Message | discord .WebhookMessage | None = None ,
50
49
) -> None :
51
50
super ().__init__ ()
52
51
self .original_author = original_author
53
52
self .suggestion = suggestion
54
53
self .webhook = webhook
55
- self .message = message
56
54
57
55
self .add_option (label = "Guild" , value = "1" , description = "This suggestion applies to the guild." , emoji = "\U0001f4c1 " )
58
56
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 "
60
58
)
61
59
self .add_option (
62
60
label = "TwitchIO" ,
@@ -85,8 +83,6 @@ async def callback(self, interaction: discord.Interaction) -> None:
85
83
embed .set_author (name = author .name , icon_url = author .display_avatar )
86
84
embed .set_footer (text = f"Suggestion sent by { author } (ID: { author .id } )" )
87
85
await self .webhook .send (embed = embed , avatar_url = author .display_avatar , username = author .name )
88
- if self .message :
89
- await self .message .delete ()
90
86
91
87
92
88
class TypeView (ui .View ):
@@ -97,9 +93,7 @@ def __init__(
97
93
) -> None :
98
94
super ().__init__ (timeout = 180 )
99
95
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 ))
103
97
104
98
async def on_timeout (self ) -> None :
105
99
await self .message .delete ()
0 commit comments