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

12
LINES

< > BotCompany Repo | #1017790 // basicFactsAboutTelegramMsg

JavaX fragment (include)

1  
static LS basicFactsAboutTelegramMsg(TelegramMsg msg) {
2  
  S triv = telegram_chatIDToTrivialName(msg.chatID);
3  
  S ref = "Message " + triv + "_" + msg.date + "_" + msg.globalID;
4  
  new LS out;
5  
  if (msg.userID == 0) out.add(ref + " was sent by bot");
6  
  else out.add(ref + " was sent by user ID " + msg.userID);
7  
  out.add(ref + " has text " + quote(msg.text));
8  
  if (msg.date != 0) out.add(ref + " has date " + msg.date);
9  
  if (msg.originalDate != 0) out.add(ref + " has original date " + msg.originalDate);
10  
  if (msg.chatID != 0) out.add(ref + " was sent in Telegram chat " + (-msg.chatID));
11  
  ret out;
12  
}

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: #1017790
Snippet name: basicFactsAboutTelegramMsg
Eternal ID of this version: #1017790/5
Text MD5: 68d7d2d90d87b19d2dc3f871a325cf9c
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-08-11 14:55:36
Source code size: 612 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 350 / 380
Version history: 4 change(s)
Referenced in: [show references]