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

23
LINES

< > BotCompany Repo | #1001365 // startBot

JavaX fragment (include)

1  
static new Map<S, S> startBot_assignments;
2  
3  
static void startBot(S botName, S botID) ctex {
4  
  DialogIO bot = newFindBot(botName);
5  
  if (bot != null)
6  
    bot.close();
7  
  else {
8  
    print("Bot " + quote(botName) + " not found. Starting " + botID);
9  
    javaxBot(botID);
10  
    waitForBotStartUp(botName);
11  
  }
12  
}
13  
14  
static void startBot(S botIDOrName) {
15  
  S botID = startBot_assignments.get(botIDOrName);
16  
  if (botID != null)
17  
    startBot(botIDOrName, botID);
18  
  else {
19  
    S botName = getBotNameFromSnippet(botIDOrName);
20  
    if (botName == null) fail("Bot name not found in source of " + botID);
21  
    startBot(botName, botIDOrName);
22  
  }
23  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1001365
Snippet name: startBot
Eternal ID of this version: #1001365/2
Text MD5: c8913132a20c28d0e9041c1f8db09533
Author: stefan
Category:
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-07-13 22:40:27
Source code size: 650 bytes / 23 lines
Pitched / IR pitched: No / No
Views / Downloads: 605 / 2210
Version history: 1 change(s)
Referenced in: [show references]