diff --git a/XiaoBot.js b/XiaoBot.js index 60892b75..f60533fe 100644 --- a/XiaoBot.js +++ b/XiaoBot.js @@ -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('')) return 'topic blocked'; + return false; +}); + client.login(TOKEN); client.setInterval(() => { diff --git a/package.json b/package.json index bc2d65d7..43667fab 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiaobot", - "version": "44.2.0", + "version": "44.3.0", "description": "Your personal server companion.", "main": "Shard.js", "scripts": {