mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-11 03:14:35 +02:00
Update Deps
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
const Command = require('../../structures/Command');
|
const Command = require('../../structures/Command');
|
||||||
const snekfetch = require('snekfetch');
|
const snekfetch = require('snekfetch');
|
||||||
const { stripIndents } = require('common-tags');
|
const { stripIndents } = require('common-tags');
|
||||||
const { upvoters } = require('../../structures/Util');
|
const { dbotsOrgKey } = require('../../config');
|
||||||
|
|
||||||
module.exports = class UpvotersCommand extends Command {
|
module.exports = class UpvotersCommand extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
@@ -16,14 +16,16 @@ module.exports = class UpvotersCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async run(msg) {
|
async run(msg) {
|
||||||
const upvotes = await upvoters(this.client.user.id);
|
|
||||||
const { body } = await snekfetch
|
const { body } = await snekfetch
|
||||||
|
.get(`https://discordbots.org/api/bots/${this.client.user.id}/votes`)
|
||||||
|
.set({ Authorization: dbotsOrgKey });
|
||||||
|
const haste = await snekfetch
|
||||||
.post('https://hastebin.com/documents')
|
.post('https://hastebin.com/documents')
|
||||||
.send(upvotes.join('\n'));
|
.send(body.map((user) => `${user.username}#${user.discriminator}`).join('\n'));
|
||||||
return msg.say(stripIndents`
|
return msg.say(stripIndents`
|
||||||
Upvote Xiao and join ${upvotes.length} others!
|
Upvote Xiao and get rewards while joining ${body.length} others!
|
||||||
<https://discordbots.org/bot/${this.client.user.id}>
|
<https://discordbots.org/bot/${this.client.user.id}>
|
||||||
List of Upvoters: <https://hastebin.com/${body.key}>
|
List of Upvoters: <https://hastebin.com/${haste.body.key}>
|
||||||
`);
|
`);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
+7
-7
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiaobot",
|
"name": "xiaobot",
|
||||||
"version": "27.1.3",
|
"version": "27.1.4",
|
||||||
"description": "Your personal server companion.",
|
"description": "Your personal server companion.",
|
||||||
"main": "Shard.js",
|
"main": "Shard.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -28,25 +28,25 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/dragonfire535/xiaobot#readme",
|
"homepage": "https://github.com/dragonfire535/xiaobot#readme",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "8.1.3"
|
"node": ">=8.1.4"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bufferutil": "^3.0.1",
|
"bufferutil": "^3.0.2",
|
||||||
"canvas": "automattic/node-canvas",
|
"canvas": "automattic/node-canvas",
|
||||||
"cheerio": "^1.0.0-rc.1",
|
"cheerio": "^1.0.0-rc.2",
|
||||||
"custom-translate": "dragonfire535/custom-translate",
|
"custom-translate": "dragonfire535/custom-translate",
|
||||||
"discord.js": "hydrabolt/discord.js",
|
"discord.js": "hydrabolt/discord.js",
|
||||||
"discord.js-commando": "gawdl3y/discord.js-commando",
|
"discord.js-commando": "gawdl3y/discord.js-commando",
|
||||||
"erlpack": "hammerandchisel/erlpack",
|
"erlpack": "hammerandchisel/erlpack",
|
||||||
"mathjs": "^3.13.3",
|
"mathjs": "^3.14.2",
|
||||||
"moment": "^2.18.1",
|
"moment": "^2.18.1",
|
||||||
"moment-duration-format": "^1.3.0",
|
"moment-duration-format": "^1.3.0",
|
||||||
"snekfetch": "^3.1.11",
|
"snekfetch": "^3.2.4",
|
||||||
"tsubaki": "^1.1.1",
|
"tsubaki": "^1.1.1",
|
||||||
"xml2js": "^0.4.17",
|
"xml2js": "^0.4.17",
|
||||||
"zalgolize": "^1.2.4"
|
"zalgolize": "^1.2.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint": "^4.0.0"
|
"eslint": "^4.2.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,13 +39,6 @@ class Util {
|
|||||||
.then(() => console.log('[DBOTSORG] Successfully posted to Discord Bots Org.'))
|
.then(() => console.log('[DBOTSORG] Successfully posted to Discord Bots Org.'))
|
||||||
.catch((err) => console.error(`[DBOTSORG] Failed to post to Discord Bots Org. ${err}`));
|
.catch((err) => console.error(`[DBOTSORG] Failed to post to Discord Bots Org. ${err}`));
|
||||||
}
|
}
|
||||||
|
|
||||||
static async upvoters(id) {
|
|
||||||
const { body } = await snekfetch
|
|
||||||
.get(`https://discordbots.org/api/bots/${id}/votes`)
|
|
||||||
.set({ Authorization: dbotsOrgKey });
|
|
||||||
return body.map((user) => `${user.username}#${user.discriminator}`);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = Util;
|
module.exports = Util;
|
||||||
|
|||||||
Reference in New Issue
Block a user