Browse Source

fix typo

push-params
Evan Feenstra 4 years ago
parent
commit
362eab22ad
  1. 9
      api/bots/mother.ts
  2. 9
      dist/api/bots/mother.js
  3. 2
      dist/api/bots/mother.js.map

9
api/bots/mother.ts

@ -111,13 +111,6 @@ export function init() {
.setDescription('No bots found') .setDescription('No bots found')
return message.channel.send({ embed }) return message.channel.send({ embed })
} }
console.log("==? SEARHED BOTS", bots, bots.map(b=> {
const maxLength = 35
const value = b.description.length>maxLength ?
b.description.substr(0,maxLength)+'...' :
b.description
return {name:b.unique_name, value}
}))
const embed3 = new Sphinx.MessageEmbed() const embed3 = new Sphinx.MessageEmbed()
.setAuthor('MotherBot') .setAuthor('MotherBot')
.setTitle('Bots:') .setTitle('Bots:')
@ -163,7 +156,7 @@ async function getBotByName(name:string) {
try { try {
const r = await fetch(`https://${config.tribes_host}/bot/${name}`) const r = await fetch(`https://${config.tribes_host}/bot/${name}`)
const j = await r.json() const j = await r.json()
if(j&&j.uuid&&j.owner_pub_key) { if(j&&j.uuid&&j.owner_pubkey) {
return j return j
} }
return null return null

9
dist/api/bots/mother.js

@ -119,13 +119,6 @@ function init() {
.setDescription('No bots found'); .setDescription('No bots found');
return message.channel.send({ embed }); return message.channel.send({ embed });
} }
console.log("==? SEARHED BOTS", bots, bots.map(b => {
const maxLength = 35;
const value = b.description.length > maxLength ?
b.description.substr(0, maxLength) + '...' :
b.description;
return { name: b.unique_name, value };
}));
const embed3 = new Sphinx.MessageEmbed() const embed3 = new Sphinx.MessageEmbed()
.setAuthor('MotherBot') .setAuthor('MotherBot')
.setTitle('Bots:') .setTitle('Bots:')
@ -173,7 +166,7 @@ function getBotByName(name) {
try { try {
const r = yield node_fetch_1.default(`https://${config.tribes_host}/bot/${name}`); const r = yield node_fetch_1.default(`https://${config.tribes_host}/bot/${name}`);
const j = yield r.json(); const j = yield r.json();
if (j && j.uuid && j.owner_pub_key) { if (j && j.uuid && j.owner_pubkey) {
return j; return j;
} }
return null; return null;

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

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save