1 | svoid telegram_sendVoiceMessageWithLogging(TelegramLongPollingBot bot, long chatID, S text, S voice, S globalID) ctex {
|
2 | Map map = litorderedmap( |
3 | type := 'sending, |
4 | voice := 'voice, |
5 | date := localDateWithMilliseconds(), |
6 | toChatID := chatID, |
7 | +globalID, |
8 | +text); |
9 | |
10 | File audioFile; |
11 | if (endsWith(voice, " raw")) {
|
12 | voice = assertCereprocVoice(dropSuffixTrim("raw", voice));
|
13 | audioFile = cereproc_raw_silent(voice, text); |
14 | } else {
|
15 | assertCereprocVoice(voice); |
16 | audioFile = cereproc_silent(voice, text); |
17 | } |
18 | |
19 | new SendVoice sending; |
20 | sending.setNewVoice(audioFile); |
21 | sending.setChatId(chatID); |
22 | bot.sendVoice(sending); |
23 | |
24 | map.put(type := 'sent); |
25 | map.put(date := localDateWithMilliseconds()); |
26 | logStructure(telegramLogFile(), printStruct(map)); |
27 | } |
Began life as a copy of #1017516
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1017988 |
| Snippet name: | telegram_sendVoiceMessageWithLogging |
| Eternal ID of this version: | #1017988/3 |
| Text MD5: | cf87a3fd7eeacec880f8436f193be5ef |
| Author: | stefan |
| Category: | javax / networking |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-08-25 20:58:00 |
| Source code size: | 816 bytes / 27 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 622 / 617 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |