Skip to content
Permalink
Browse files

add kdh

  • Loading branch information...
gc committed Jul 8, 2019
1 parent 0c5a85b commit 4cc04ea001532f3cf01038ff7d270fe0165e4859
Showing with 47 additions and 7 deletions.
  1. +2 −5 bot/index.js
  2. +25 −0 bot/routes/application.js
  3. +13 −0 bot/routes/commands.js
  4. +7 −2 config/index.js
@@ -1,12 +1,9 @@
const { Client } = require('klasa');
const {
token,
clientOptions,
clientProperties
} = require('../config');
const { token, clientOptions, clientProperties } = require('../config');

Client.use(require('@kcp/tags'));
Client.use(require('klasa-textchannel-gateway'));
Client.use(require('klasa-dashboard-hooks'));

require('../config/Schemas');

@@ -0,0 +1,25 @@
const { Route } = require('klasa-dashboard-hooks');
const { Duration } = require('klasa');

module.exports = class extends Route {

constructor(...args) {
super(...args, { route: 'application' });
}

get(request, response) {
return response.end(
JSON.stringify({
users: this.client.users.size,
guilds: this.client.guilds.size,
channels: this.client.channels.size,
shards: this.client.options.shardCount,
uptime: Duration.toNow(Date.now() - process.uptime() * 1000),
memory: process.memoryUsage().heapUsed / 1024 / 1024,
invite: this.client.invite,
...this.client.application
})
);
}

};
@@ -0,0 +1,13 @@
const { Route } = require('klasa-dashboard-hooks');

module.exports = class extends Route {

constructor(...args) {
super(...args, { route: 'commands' });
}

get(request, response) {
return response.end(JSON.stringify(this.client.commands));
}

};
@@ -1,6 +1,6 @@
const emoji = require('./skill-emoji');
const streamers = require('../data/osrs-streamers');
const { token, twitchClientID, twitterApp, dbl } = require('./private.js');
const { token, twitchClientID, twitterApp, dbl, clientSecret, KDHOptions } = require('./private.js');

const production = require('os').platform() === 'linux';

@@ -48,6 +48,11 @@ module.exports = {
providers: { default: production ? 'rethinkdb' : 'json' },
permissionLevels: require('./PermissionLevels'),
pieceDefaults: { commands: { deletable: true } },
readyMessage: client => `[Old School Bot] Ready to serve ${client.guilds.size} guilds and ${client.users.size} users`
readyMessage: client =>
`[Old School Bot] Ready to serve ${client.guilds.size} guilds and ${client.users.size} users`,
/* KDH */
clientSecret,
clientID: '303730326692429825',
dashboardHooks: KDHOptions
}
};

0 comments on commit 4cc04ea

Please sign in to comment.
You can’t perform that action at this time.