feat(telegram): wire audioAsVoice through bot.ts
- Add audioAsVoice option to ReplyPayload type - Update bot.ts to use sendVoice by default for audio (voice bubble) - When audioAsVoice is false, use sendAudio (file with metadata) This allows agents to control voice vs file mode via ReplyPayload.
This commit is contained in:
1 parent
20fd9f7f67
commit
5e1b91b32c
2 files changed
+12
-3
No files matched your search
+10
-3
@@ -1250,9 +1250,16 @@ async function deliverReplies(params: {
|
||||
...mediaParams,
|
||||
});
|
||||
} else if (kind === "audio") {
|
||||
await bot.api.sendAudio(chatId, file, {
|
||||
...mediaParams,
|
||||
});
|
||||
const useVoice = reply.audioAsVoice === true; // default false
|
||||
if (useVoice) {
|
||||
await bot.api.sendVoice(chatId, file, {
|
||||
...mediaParams,
|
||||
});
|
||||
} else {
|
||||
await bot.api.sendAudio(chatId, file, {
|
||||
...mediaParams,
|
||||
});
|
||||
}
|
||||
} else {
|
||||
await bot.api.sendDocument(chatId, file, {
|
||||
...mediaParams,
|
||||
|
||||
Reference in new issue
Block a user