added anon report

This commit is contained in:
Dan
2024-05-05 20:05:05 -04:00
parent bff5b4387b
commit bb5c034309

View File

@ -30,6 +30,17 @@ class Nessa(discord.Client):
await self.close()
else:
await interaction.response.send_message("Hey! I don't know you! You don't have permission to use this command. Only the owner can do that.", ephemeral=True)
@self.tree.command(name="report_issue", description="Send an anonymous issue report.")
async def report_issue(interaction: discord.Interaction, message: str):
# Your Discord user ID
your_user_id = OWNER_ID
# Fetch your user object using your ID
owner = await bot.fetch_user(your_user_id)
# Send the DM to you
await owner.send(f"Hey Chief, I got a report for you: {message}")
# Respond to the user to confirm the message has been sent
await interaction.response.send_message("I've passed on your issue to the Chief!", ephemeral=True)
async def on_ready(self):
print(f"Logged on as {self.user}!")