I can destructure that

This commit is contained in:
Daniel Odendahl Jr
2017-04-26 01:57:58 +00:00
parent 8f90cb1772
commit 14ef901b77
2 changed files with 6 additions and 6 deletions
+5 -5
View File
@@ -1,5 +1,5 @@
const { CommandoClient } = require('discord.js-commando');
const Stats = require('./poststats');
const { carbon, discordBots } = require('./poststats');
const path = require('path');
const client = new CommandoClient({
commandPrefix: 'x;',
@@ -34,13 +34,13 @@ client.on('guildCreate', async(guild) => {
const count = guilds.reduce((prev, val) => prev + val, 0);
console.log(`[Count] ${count}`);
try {
await Stats.carbon(count);
await carbon(count);
console.log(`[Carbon] Successfully posted to Carbon.`);
} catch (err) {
console.log(`[Carbon] Failed to post to Carbon. ${err}`);
}
try {
await Stats.discordBots(count, client.user.id);
await discordBots(count, client.user.id);
console.log(`[Discord Bots] Successfully posted to Discord Bots.`);
} catch (err) {
console.log(`[Discord Bots] Failed to post to Discord Bots. ${err}`);
@@ -53,13 +53,13 @@ client.on('guildDelete', async(guild) => {
const count = guilds.reduce((prev, val) => prev + val, 0);
console.log(`[Count] ${count}`);
try {
await Stats.carbon(count);
await carbon(count);
console.log(`[Carbon] Successfully posted to Carbon.`);
} catch (err) {
console.log(`[Carbon] Failed to post to Carbon. ${err}`);
}
try {
await Stats.discordBots(count, client.user.id);
await discordBots(count, client.user.id);
console.log(`[Discord Bots] Successfully posted to Discord Bots.`);
} catch (err) {
console.log(`[Discord Bots] Failed to post to Discord Bots. ${err}`);
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiaobot",
"version": "15.3.21",
"version": "15.3.22",
"description": "A Discord Bot",
"main": "shardingmanager.js",
"scripts": {