From 9a33539e161ddc21135cb6f6540688c986d03db8 Mon Sep 17 00:00:00 2001 From: Junior Date: Sat, 23 Nov 2024 15:40:42 +0000 Subject: [PATCH] Add config option to enable/disable command parsing. Useful for presence/ingamechat bot instances. --- config/config-dist.js | 2 +- index.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config/config-dist.js b/config/config-dist.js index 3b17f4b..8b6f04c 100644 --- a/config/config-dist.js +++ b/config/config-dist.js @@ -7,7 +7,7 @@ const config = { RESTART_ROLE: '123456789012345678', ALLOW_RESTART: false, PRESENCE_INTERVAL: 5, - ONLINE_CHECK: false + ALLOW_COMMANDS: false, } module.exports = config; diff --git a/index.js b/index.js index 3961e61..5ae48a5 100644 --- a/index.js +++ b/index.js @@ -84,6 +84,7 @@ function getOnlineReport(channel = null) { client.on('messageCreate', (msg) => { if ( msg.author.id === client.user.id ) return; + if ( Config.ALLOW_COMMANDS == false ) return; if ( msg.content.startsWith(">>paddle") ) { if ( msg.member.roles.cache.has(Config.MOD_ROLE) || msg.member.roles.cache.has(Config.STAFF_ROLE) ) { let response = "";