Fixed /say

This commit is contained in:
2026-05-01 08:33:37 +03:00
parent 786cb3c0f8
commit 6b0e059b56
+4 -1
View File
@@ -254,8 +254,11 @@ async def gamble(interaction: nextcord.Interaction, bet: float):
@bot.slash_command()
async def say(interaction: nextcord.Interaction, text: str = "", attachment: nextcord.Attachment = None):
if interaction.user.id == 1043523548339241001:
file = None
if attachment:
data = await attachment.read()
await interaction.channel.send(text, file = nextcord.File(io.BytesIO(data), filename=attachment.filename))
file = nextcord.File(io.BytesIO(data), filename=attachment.filename)
await interaction.channel.send(text, file = file)
await interaction.send("OK", ephemeral=True)
else:
await interaction.send("Wrong guy", ephemeral=True)