Sacul
10 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
3 additions and
3 deletions
-
discord/ui/modal.py
|
|
|
@ -70,11 +70,11 @@ class Modal(BaseView): |
|
|
|
from discord import ui |
|
|
|
|
|
|
|
class Questionnaire(ui.Modal, title='Questionnaire Response'): |
|
|
|
name = ui.TextInput(label='Name') |
|
|
|
answer = ui.TextInput(label='Answer', style=discord.TextStyle.paragraph) |
|
|
|
name = ui.Label(text='Name', component=ui.TextInput()) |
|
|
|
answer = ui.Label(text='Answer', component=ui.TextInput(style=discord.TextStyle.paragraph)) |
|
|
|
|
|
|
|
async def on_submit(self, interaction: discord.Interaction): |
|
|
|
await interaction.response.send_message(f'Thanks for your response, {self.name}!', ephemeral=True) |
|
|
|
await interaction.response.send_message(f'Thanks for your response, {self.name.component.value}!', ephemeral=True) |
|
|
|
|
|
|
|
Parameters |
|
|
|
----------- |
|
|
|
|