Browse Source

fix bot res

push-params
Evan Feenstra 4 years ago
parent
commit
50a72433a8
  1. 5
      api/controllers/bots.ts
  2. 5
      dist/api/controllers/bots.js
  3. 2
      dist/api/controllers/bots.js.map

5
api/controllers/bots.ts

@ -45,6 +45,7 @@ export async function processBotMessage(msg:Msg, chat, botInTribe): Promise<bool
case 'install':
if(arr.length<3) return false
installBot(arr[2], botInTribe)
return true
default:
genBotRes(chat,botHelpHTML)
}
@ -54,13 +55,13 @@ export async function processBotMessage(msg:Msg, chat, botInTribe): Promise<bool
return true
}
const botHelpHTML=`<p>
const botHelpHTML=`<div>
<b>Bot commands:</b>
<ul>
<li><b>/bot install {BOTNAME}:</b>&nbsp;Install a new bot
<li><b>/bot help:</b>&nbsp;Print out this help message
</ul>
<p>
<div>
`
/* intercept */

5
dist/api/controllers/bots.js

@ -57,6 +57,7 @@ function processBotMessage(msg, chat, botInTribe) {
if (arr.length < 3)
return false;
installBot(arr[2], botInTribe);
return true;
default:
genBotRes(chat, botHelpHTML);
}
@ -67,13 +68,13 @@ function processBotMessage(msg, chat, botInTribe) {
});
}
exports.processBotMessage = processBotMessage;
const botHelpHTML = `<p>
const botHelpHTML = `<div>
<b>Bot commands:</b>
<ul>
<li><b>/bot install {BOTNAME}:</b>&nbsp;Install a new bot
<li><b>/bot help:</b>&nbsp;Print out this help message
</ul>
<p>
<div>
`;
/* intercept */
function installBot(botname, botInTribe) {

2
dist/api/controllers/bots.js.map

@ -1 +1 @@
{"version":3,"file":"bots.js","sourceRoot":"","sources":["../../../api/controllers/bots.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,6BAA4B;AAE5B,oCAAmC;AACnC,qCAAoC;AACpC,sCAAkC;AAClC,0CAAyC;AACzC,2CAA0C;AAE1C,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,6BAA6B,CAAC,CAAC,CAAA;AAE9E,SAAe,SAAS,CAAC,IAAI,EAAC,IAAI;;QAChC,IAAI,IA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