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

22
LINES

< > BotCompany Repo | #1027772 // Msg + MsgOut

JavaX fragment (include)

sclass MsgOut extends DynamicObject {
  S buttonsIntro;
  LS buttons;
  S placeholder;
  S defaultInput;
  
  bool isEmpty() { ret empty(buttons); }
}

sclass Msg extends DynamicObject {
  long time;
  bool fromUser;
  S text;
  MsgOut out;
  
  *() {}
  *(bool *fromUser, S *text) { time = now(); }
  
  toString {
    ret "[" + time + "] " + (fromUser ? "User" : "Bot") + ": " + text;
  }
}

Author comment

Began life as a copy of #1027630

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1027772
Snippet name: Msg + MsgOut
Eternal ID of this version: #1027772/1
Text MD5: beb837664f56e93a44906b525eae086b
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-04-10 18:50:37
Source code size: 413 bytes / 22 lines
Pitched / IR pitched: No / No
Views / Downloads: 290 / 557
Referenced in: #1034167 - Standard Classes + Interfaces (LIVE, continuation of #1003674)