Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

17
LINES

< > BotCompany Repo | #1017516 // telegram_sendWithLogging

JavaX fragment (include)

1  
svoid telegram_sendWithLogging(TelegramLongPollingBot bot, long chatID, S text, S globalID) ctex {
2  
  Map map = litorderedmap(
3  
    type := 'sending,
4  
    date := localDateWithMilliseconds(),
5  
    toChatID := chatID,
6  
    +globalID,
7  
    +text);
8  
9  
  new SendMessage sending;
10  
  sending.setText(text);
11  
  sending.setChatId(chatID);
12  
  bot.sendMessage(sending);
13  
  
14  
  map.put(type := 'sent);
15  
  map.put(date := localDateWithMilliseconds());
16  
  logStructure(telegramLogFile(), printStruct(map));
17  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1017516
Snippet name: telegram_sendWithLogging
Eternal ID of this version: #1017516/8
Text MD5: 97a14ebe9b926aad6ea17ee650bab1e7
Author: stefan
Category: javax / networking
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-08-12 18:08:36
Source code size: 497 bytes / 17 lines
Pitched / IR pitched: No / No
Views / Downloads: 317 / 370
Version history: 7 change(s)
Referenced in: [show references]