mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-09 09:12:07 +02:00
Make Code Prettier
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
const Sequelize = require('sequelize');
|
||||
const database = new Sequelize(process.env.DATABASE_URL, { logging: false });
|
||||
|
||||
module.exports = class Database {
|
||||
class Database {
|
||||
static get db() {
|
||||
return database;
|
||||
}
|
||||
@@ -17,4 +17,6 @@ module.exports = class Database {
|
||||
.then(() => console.log('[Database] Ready!'))
|
||||
.catch(err => console.error(`[Database] Unable to connect: ${err}`));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = Database;
|
||||
|
||||
+9
-14
@@ -1,27 +1,22 @@
|
||||
const request = require('superagent');
|
||||
|
||||
module.exports = class Stats {
|
||||
class Stats {
|
||||
constructor() {
|
||||
throw new Error(`The ${this.constructor.name} class may not be instantiated.`);
|
||||
}
|
||||
|
||||
static discordBots(count, userID) {
|
||||
static discordBots(server_count, userID) {
|
||||
return request
|
||||
.post(`https://bots.discord.pw/api/bots/${userID}/stats`)
|
||||
.set({
|
||||
'Authorization': process.env.DISCORD_BOTS_KEY
|
||||
})
|
||||
.send({
|
||||
server_count: count
|
||||
});
|
||||
.set({ 'Authorization': process.env.DISCORD_BOTS_KEY })
|
||||
.send({ server_count });
|
||||
}
|
||||
|
||||
static carbon(count) {
|
||||
static carbon(servercount) {
|
||||
return request
|
||||
.post('https://www.carbonitex.net/discord/data/botdata.php')
|
||||
.send({
|
||||
key: process.env.CARBON_KEY,
|
||||
servercount: count
|
||||
});
|
||||
.send({ key: process.env.CARBON_KEY, servercount });
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = Stats;
|
||||
|
||||
Reference in New Issue
Block a user