<blocked> prevents commands

This commit is contained in:
Daniel Odendahl Jr
2017-10-03 01:43:27 +00:00
parent 87eda0376d
commit 3aa9a0bf78
2 changed files with 7 additions and 1 deletions
+6
View File
@@ -77,6 +77,12 @@ client.on('guildDelete', async () => {
postStats(count, client.user.id);
});
client.dispatcher.addInhibitor(msg => {
if (msg.channel.type !== 'text' || !msg.channel.topic) return false;
if (msg.channel.topic.includes('<blocked>')) return 'topic blocked';
return false;
});
client.login(TOKEN);
client.setInterval(() => {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiaobot",
"version": "44.2.0",
"version": "44.3.0",
"description": "Your personal server companion.",
"main": "Shard.js",
"scripts": {