mirror of
https://github.com/neoarz/Syntrel.git
synced 2025-12-25 03:40:11 +01:00
Replaced the embed author icon URLs from 'y5SEZ9.webp' to 'gSxqzV.png' across botinfo, feedback, ping, serverinfo, and uptime cogs for consistency and to use the new image.
47 lines
1.7 KiB
Python
47 lines
1.7 KiB
Python
import discord
|
|
from discord import app_commands
|
|
from discord.ext import commands
|
|
|
|
class FeedbackForm(discord.ui.Modal, title="Feeedback"):
|
|
feedback = discord.ui.TextInput(
|
|
label="What do you think about this bot?",
|
|
style=discord.TextStyle.long,
|
|
placeholder="Type your answer here...",
|
|
required=True,
|
|
max_length=256,
|
|
)
|
|
|
|
async def on_submit(self, interaction: discord.Interaction):
|
|
self.interaction = interaction
|
|
self.answer = str(self.feedback)
|
|
self.stop()
|
|
|
|
def feedback_command():
|
|
@app_commands.command(
|
|
name="feedback", description="Submit a feedback for the owners of the bot"
|
|
)
|
|
async def feedback(self, interaction: discord.Interaction):
|
|
feedback_form = FeedbackForm()
|
|
await interaction.response.send_modal(feedback_form)
|
|
|
|
await feedback_form.wait()
|
|
interaction = feedback_form.interaction
|
|
await interaction.response.send_message(
|
|
embed=discord.Embed(
|
|
title="Thank You!",
|
|
description="Your feedback has been submitted, the owners have been notified about it.",
|
|
color=0x7289DA,
|
|
).set_author(name="Feedback System", icon_url="https://yes.nighty.works/raw/gSxqzV.png"),
|
|
ephemeral=True,
|
|
)
|
|
|
|
app_owner = (await self.bot.application_info()).owner
|
|
await app_owner.send(
|
|
embed=discord.Embed(
|
|
title="New Feedback",
|
|
description=f"{interaction.user} (<@{interaction.user.id}>) has submitted a new feedback:\n```\n{feedback_form.answer}\n```",
|
|
color=0x7289DA,
|
|
).set_author(name="Feedback System", icon_url="https://yes.nighty.works/raw/gSxqzV.png")
|
|
)
|
|
|
|
return feedback |