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

18
LINES

< > BotCompany Repo | #1022147 // Set Gazelle Thought to current time (test message editing)

JavaX source code (Dynamic Module) [tags: use-pretranspiled] - run with: Stefan's OS

Uses 911K of libraries. Click here for Pure Java version (3764L/20K).

!7

cmodule ThinkCurrentTime > DynPrintLogAndEnabled {
  start {
    updateMsg();
  }
  
  void updateMsg enter {
    if (enabled) pcall {
      S text = print("New thought: ", "We passed " + localTime_24_minutesToZero());
      Pair<Long> id = gazelle_thoughtMessageID();
      dm_call('discordBot, 'editMessage, id.a, id.b, text);
    }
    long delay = (timeToNextLocalHour()+100) % (60*60000);
    localPrint("Delay: " + delay);
    doAfter(delay, r updateMsg);
  }
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1022147
Snippet name: Set Gazelle Thought to current time (test message editing)
Eternal ID of this version: #1022147/4
Text MD5: 9309a7b1766ac87a96f1a2192aac4192
Transpilation MD5: ff1c649ecb4ac5e4099bea85d6d6842e
Author: stefan
Category: javax / discord
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-03-12 17:21:57
Source code size: 488 bytes / 18 lines
Pitched / IR pitched: No / No
Views / Downloads: 308 / 3191
Version history: 3 change(s)
Referenced in: [show references]