Browse Source

btc bot installation

push-params
Evan Feenstra 4 years ago
parent
commit
b9e4339b99
  1. 10
      api/bots/btc.ts
  2. 2
      api/bots/index.ts
  3. 29
      api/bots/mother.ts
  4. 2
      dist/api/bots/btc.js.map
  5. 3
      dist/api/bots/index.js
  6. 2
      dist/api/bots/index.js.map
  7. 27
      dist/api/bots/mother.js
  8. 2
      dist/api/bots/mother.js.map

10
api/bots/btc.ts

@ -39,13 +39,13 @@ export function init() {
const price = j.data.BTC.quote.USD.price.toFixed(2)
const percentChange24 = j.data.BTC.quote.USD.percent_change_24h.toFixed(2)
const embed = new Sphinx.MessageEmbed()
.setAuthor('BitcoinBot')
.setTitle('Bitcoin Price:')
.addFields([
.setAuthor('BitcoinBot')
.setTitle('Bitcoin Price:')
.addFields([
{ name: 'Price:', value: price },
{ name: '24 Hour Change', value: percentChange24+'%' }
])
.setThumbnail(botSVG)
])
.setThumbnail(botSVG)
message.channel.send({ embed })
} catch(e){
console.log('BTC bot error',e)

2
api/bots/index.ts

@ -2,6 +2,7 @@
import * as SphinxBot from 'sphinx-bot'
import * as MotherBot from './mother'
import * as WelcomeBot from './welcome'
import * as BitcoinBot from './btc'
import {Msg} from '../network/interfaces'
import * as path from 'path'
import { models } from '../models'
@ -18,6 +19,7 @@ async function init(){
builtInBots.forEach(b=>{
if(b.botPrefix==='/welcome') WelcomeBot.init()
if(b.botPrefix==='/btc') BitcoinBot.init()
})
}

29
api/bots/mother.ts

@ -3,15 +3,31 @@ import * as Sphinx from 'sphinx-bot'
import { finalAction } from '../controllers/actions'
import * as path from 'path'
import * as WelcomeBot from './welcome'
import * as BitcoinBot from './btc'
import { models } from '../models'
const msg_types = Sphinx.MSG_TYPE
const constants = require(path.join(__dirname, '../../config/constants.json'))
const builtinBots = [
'welcome',
'welcome', 'btc'
]
const builtInBotMsgTypes = {
'welcome':[
constants.message_types.message,
constants.message_types.group_join
],
'btc':[
constants.message_types.message,
]
}
const builtInBotNames = {
welcome:'WelcomeBot',
btc:'BitcoinBot'
}
export function init() {
const client = new Sphinx.Client()
@ -37,18 +53,19 @@ export function init() {
chatId: chat.id,
botPrefix: '/'+botName,
botType:constants.bot_types.builtin,
msgTypes:JSON.stringify([
constants.message_types.message,
constants.message_types.group_join
])
msgTypes:JSON.stringify(builtInBotMsgTypes[botName])
}
await models.ChatBot.create(chatBot)
if(botName==='welcome') {
WelcomeBot.init()
}
if(botName==='btc') {
BitcoinBot.init()
}
const theName = builtInBotNames[botName] || 'Bot'
const embed = new Sphinx.MessageEmbed()
.setAuthor('MotherBot')
.setDescription('WelcomeBot has been installed!')
.setDescription(theName+' has been installed!')
message.channel.send({ embed })
} else {
// message.reply('No built-in bot by that name')

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

@ -1 +1 @@
{"version":3,"file":"btc.js","sourceRoot":"","sources":["../../../api/bots/btc.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,qCAAoC;AACpC,oDAAoD;AACpD,oCAAmC;AACnC,MAAM,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAA;AAEjC,IAAI,OAAO,GAAG,KAAK,CAAA;AAEnB;;EAEE;AAEF,MAAM,KAAK,GAAG,sCAAsC,CAAA;AACpD,MAAM,GAAG,GAAG,mEAAmE,CAAA;AAE/E,SAAgB,IAAI;IAClB,IAAG,OAAO;QAAE,OAAM;IAClB,OAAO,GAAG,IAAI,CAAA;IAEd,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,MAAM,EAAE,CAAA;IAClC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,qBAAW,CAAC,CAAA;IAE9B,MAAM,CAAC,EAAE,CAAC,SAAS,CAAC,OAAO,EAAE,CAAO,OAAuB,EAAE,EAAE;QAC7D,MAAM,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;QACtC,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC;YAAE,OAAM;QAC1B,IAAI,GAAG,CAAC,CAAC,CAAC,KAAG,MAAM;YAAE,OAAM;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vB,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC,CAAA;iBAClC;gBAAC,OAAM,CAAC,EAAC;oBACN,OAAO,CAAC,GAAG,CAAC,eAAe,EAAC,CAAC,CAAC,CAAA;iBACjC;gBACD,OAAM;YAER;gBACE,MAAM,KAAK,GAAG,IAAI,MAAM,CAAC,YAAY,EAAE;qBACpC,SAAS,CAAC,YAAY,CAAC;qBACvB,QAAQ,CAAC,sBAAsB,CAAC;qBAChC,SAAS,CAAC;oBACT,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,YAAY,EAAE;oBAChD,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE;iBACrC,CAAC;qBACD,YAAY,CAAC,MAAM,CAAC,CAAA;gBACvB,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC,CAAA;gBAC/B,OAAM;SACT;IACH,CAAC,CAAA,CAAC,CAAA;AACJ,CAAC;AArDD,oBAqDC;AAED,MAAM,MAAM,GAAG;;OAER,CAAA"}

3
dist/api/bots/index.js

@ -13,6 +13,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
const SphinxBot = require("sphinx-bot");
const MotherBot = require("./mother");
const WelcomeBot = require("./welcome");
const BitcoinBot = require("./btc");
const path = require("path");
const models_1 = require("../models");
const constants = require(path.join(__dirname, '../../config/constants.json'));
@ -27,6 +28,8 @@ function init() {
builtInBots.forEach(b => {
if (b.botPrefix === '/welcome')
WelcomeBot.init();
if (b.botPrefix === '/btc')
BitcoinBot.init();
});
});
}

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

@ -1 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../api/bots/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,mDAAmD;AACnD,wCAAuC;AACvC,sCAAqC;AACrC,wCAAuC;AAEvC,6BAA4B;AAC5B,sCAAkC;AAElC,MAAM,SAAS,GAAG,OAAO,CAAC,I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AAA;IACD,IAAG,GAAG,CAAC,MAAM,CAAC,IAAI,KAAG,SAAS,CAAC,UAAU,CAAC,KAAK,EAAE;QAC7C,IAAG,CAAC,CAAC,MAAM;YAAE,CAAC,CAAC,MAAM,CAAC,KAAK,GAAC,CAAC;oBACzB,IAAI,EAAC,OAAO;iBACf,CAAC,CAAA;KACL;IACD,SAAS,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC,CAAA;AACjC,CAAC;AAEY,wCAAc"}

27
dist/api/bots/mother.js

@ -14,12 +14,26 @@ const Sphinx = require("sphinx-bot");
const actions_1 = require("../controllers/actions");
const path = require("path");
const WelcomeBot = require("./welcome");
const BitcoinBot = require("./btc");
const models_1 = require("../models");
const msg_types = Sphinx.MSG_TYPE;
const constants = require(path.join(__dirname, '../../config/constants.json'));
const builtinBots = [
'welcome',
'welcome', 'btc'
];
const builtInBotMsgTypes = {
'welcome': [
constants.message_types.message,
constants.message_types.group_join
],
'btc': [
constants.message_types.message,
]
};
const builtInBotNames = {
welcome: 'WelcomeBot',
btc: 'BitcoinBot'
};
function init() {
const client = new Sphinx.Client();
client.login('_', actions_1.finalAction);
@ -46,18 +60,19 @@ function init() {
chatId: chat.id,
botPrefix: '/' + botName,
botType: constants.bot_types.builtin,
msgTypes: JSON.stringify([
constants.message_types.message,
constants.message_types.group_join
])
msgTypes: JSON.stringify(builtInBotMsgTypes[botName])
};
yield models_1.models.ChatBot.create(chatBot);
if (botName === 'welcome') {
WelcomeBot.init();
}
if (botName === 'btc') {
BitcoinBot.init();
}
const theName = builtInBotNames[botName] || 'Bot';
const embed = new Sphinx.MessageEmbed()
.setAuthor('MotherBot')
.setDescription('WelcomeBot has been installed!');
.setDescription(theName + ' has been installed!');
message.channel.send({ embed });
}
else {

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

@ -1 +1 @@
{"version":3,"file":"mother.js","sourceRoot":"","sources":["../../../api/bots/mother.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,oDAAoD;AACpD,qCAAoC;AACp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