From 9e8205d8409977d039c665bfeb4da05bea94dcd0 Mon Sep 17 00:00:00 2001 From: wfxey <158351052+wfxey@users.noreply.github.com> Date: Fri, 2 Aug 2024 11:10:50 +0200 Subject: [PATCH] Update main.py --- main.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/main.py b/main.py index 8988e25..a35fe8a 100644 --- a/main.py +++ b/main.py @@ -87,14 +87,16 @@ class FeedbackModal(Modal): def __init__(self): super().__init__(title="Feedback") - self.add_item(TextInput(label="Rate our Bot", placeholder="Rate your experience from 1-10")) + self.add_item(TextInput(label="Program", style=discord.TextStyle.short)) + self.add_item(TextInput(label="Rate your chosen Program", placeholder="Rate your experience from 1-10")) self.add_item(TextInput(label="Why?", placeholder="Why did you give this rating?", style=discord.TextStyle.short)) self.add_item(TextInput(label="Feature Request", placeholder="What features would you like to see?", style=discord.TextStyle.paragraph)) async def on_submit(self, interaction: discord.Interaction): - rating = self.children[0].value - reason = self.children[1].value - feature_request = self.children[2].value + program = self.children[0].value + rating = self.children[1].value + reason = self.children[2].value + feature_request = self.children[3].value feedback_directory = "feedback" @@ -122,6 +124,7 @@ async def on_submit(self, interaction: discord.Interaction): response_message = ( '# Feedback\n\n' + f'Program : {program}' f'Given rating: {rating}.\n' f'Reason: {reason}\n' f'Feature request: {feature_request}\n\n' @@ -133,6 +136,7 @@ async def on_submit(self, interaction: discord.Interaction): text_message = ( '# Feedback\n\n' + f'Program : {program}' f'Submitted by USER-ID : {user_id}\n' f'Submitted at: {today_date}\n' f'Given rating: {rating}.\n' @@ -375,4 +379,4 @@ async def pypi_command(interaction: discord.Interaction, package_name: str): client.tree.add_command(website_command) client.tree.add_command(feedback) -client.run(TOKEN) \ No newline at end of file +client.run(TOKEN)