transcribe-bot/transcribebot.py

15 lines
492 B
Python
Raw Normal View History

2023-04-15 13:29:24 +00:00
import disnake
from disnake.ext import commands
from dotenv import load_dotenv
import os
load_dotenv()
bot = commands.Bot(command_prefix='.')
@bot.message_command(name="Transcrible")
async def transcribe(inter: disnake.ApplicationCommandInteraction, message: disnake.Message):
# Reversing the message and sending it back.
2023-04-15 13:42:37 +00:00
await message.attachments[0].save("audio.mp3")
await inter.response.send_message("audio saved", file=disnake.File("audio.mp3"))
2023-04-15 13:29:24 +00:00
bot.run(os.getenv("TOKEN"))