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).

1  
!7
2  
3  
cmodule ThinkCurrentTime > DynPrintLogAndEnabled {
4  
  start {
5  
    updateMsg();
6  
  }
7  
  
8  
  void updateMsg enter {
9  
    if (enabled) pcall {
10  
      S text = print("New thought: ", "We passed " + localTime_24_minutesToZero());
11  
      Pair<Long> id = gazelle_thoughtMessageID();
12  
      dm_call('discordBot, 'editMessage, id.a, id.b, text);
13  
    }
14  
    long delay = (timeToNextLocalHour()+100) % (60*60000);
15  
    localPrint("Delay: " + delay);
16  
    doAfter(delay, r updateMsg);
17  
  }
18  
}

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: 309 / 3194
Version history: 3 change(s)
Referenced in: [show references]