Correction des multiples bugs
This commit is contained in:
parent
5fe70d754b
commit
07198c20b7
15 changed files with 707 additions and 348 deletions
|
|
@ -2,13 +2,14 @@ import discord
|
|||
from .data.models import TicketData
|
||||
|
||||
class FeedbackView(discord.ui.View):
|
||||
def __init__(self, bot, storage, ticket: TicketData):
|
||||
def __init__(self, bot, storage, ticket: TicketData, staff_rating_only: bool = False):
|
||||
super().__init__(timeout=86400) # 24h timeout
|
||||
self.bot = bot
|
||||
self.storage = storage
|
||||
self.ticket = ticket
|
||||
self.rating = 0
|
||||
self.comment = ""
|
||||
self.staff_rating_only = staff_rating_only
|
||||
|
||||
# Add Select Menu for Rating
|
||||
self.add_item(RatingSelect())
|
||||
|
|
@ -32,7 +33,11 @@ class FeedbackView(discord.ui.View):
|
|||
for child in self.children:
|
||||
child.disabled = True
|
||||
|
||||
await interaction.response.edit_message(content="✅ Merci pour votre retour !", view=self, embed=None)
|
||||
# If this is a staff rating only view, we don't send the normal message
|
||||
if not self.staff_rating_only:
|
||||
await interaction.response.edit_message(content="✅ Merci pour votre retour !", view=self, embed=None)
|
||||
else:
|
||||
await interaction.response.edit_message(content="✅ Note envoyée !", view=self, embed=None)
|
||||
|
||||
# Log feedback if configured
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue