svoid telegram_sendVoiceMessageWithLogging(TelegramLongPollingBot bot, long chatID, S text, S voice, S globalID) ctex { Map map = litorderedmap( type := 'sending, voice := 'voice, date := localDateWithMilliseconds(), toChatID := chatID, +globalID, +text); File audioFile; if (endsWith(voice, " raw")) { voice = assertCereprocVoice(dropSuffixTrim("raw", voice)); audioFile = cereproc_raw_silent(voice, text); } else { assertCereprocVoice(voice); audioFile = cereproc_silent(voice, text); } new SendVoice sending; sending.setNewVoice(audioFile); sending.setChatId(chatID); bot.sendVoice(sending); map.put(type := 'sent); map.put(date := localDateWithMilliseconds()); logStructure(telegramLogFile(), printStruct(map)); }