Fix Errors?

This commit is contained in:
Daniel Odendahl Jr
2017-09-07 18:55:03 +00:00
parent 8959581614
commit 91f62a9989
3 changed files with 12 additions and 5 deletions
+9 -1
View File
@@ -97,4 +97,12 @@ client.on('guildDelete', async guild => {
client.login(TOKEN);
process.on('unhandledRejection', console.error);
client.setTimeout(() => {
console.log(`[RESTART] Shard ${client.shard.id} restarted!`);
process.exit(0);
}, 8.64e+7);
process.on('unhandledRejection', err => {
console.error('Unhandled Promise Rejection:', err);
process.exit(1);
});
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiaobot",
"version": "37.4.1",
"version": "37.4.2",
"description": "Your personal server companion.",
"main": "Shard.js",
"scripts": {
+2 -3
View File
@@ -33,9 +33,8 @@ class Util {
static filterTopics(channels, setting) {
return channels.filter(c => {
if (c.type !== 'text' || !c.topic) return false;
if (c.topic.includes(`<${setting}>`)) return true;
return false;
if (c.type !== 'text' || !c.topic || !c.permissionsFor(c.client.user).has('SEND_MESSAGES')) return false;
return c.topic.includes(`<${setting}>`);
});
}