Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
wfxey authored Aug 2, 2024
1 parent 85cd0b3 commit 9e8205d
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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'
Expand All @@ -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'
Expand Down Expand Up @@ -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)
client.run(TOKEN)

0 comments on commit 9e8205d

Please sign in to comment.