如何让机器人回复音频消息?
How can I make bot reply to an audio message?
如何让 aiogram bot 回复音频消息?
我已经试过了:
if message.Audio.duration <= 60:
await message.reply("message")
@dp.message_handler(content_types=types.ContentTypes.VOICE | types.ContentTypes.AUDIO)
async def audio_message_handler(msg: types.Message):
if msg.content_type == "voice":
await msg.reply("Voice message")
elif msg.content_type == "audio":
await msg.reply("Audio message")
如何让 aiogram bot 回复音频消息? 我已经试过了:
if message.Audio.duration <= 60:
await message.reply("message")
@dp.message_handler(content_types=types.ContentTypes.VOICE | types.ContentTypes.AUDIO)
async def audio_message_handler(msg: types.Message):
if msg.content_type == "voice":
await msg.reply("Voice message")
elif msg.content_type == "audio":
await msg.reply("Audio message")