diff --git a/index.ts b/index.ts index e4b4bc6..e260aa4 100644 --- a/index.ts +++ b/index.ts @@ -57,7 +57,19 @@ client.once('ready', async () => { if (e.author.bot) return; if (e.author === client.user) return; - const profane = new Filter().isProfane(e.content); + if ( + process.env.NODE_ENV === 'development' && + e.channelId !== '977401259260788756' + ) { + return; + } else if ( + process.env.NODE_ENV !== 'development' && + e.channelId === '977401259260788756' + ) { + return; + } + + const profane = new Filter({ exclude: ['damn'] }).isProfane(e.content); if (profane) { e.reply({ diff --git a/package.json b/package.json index 6427f3e..38e3c50 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.0.1", "license": "MIT", "scripts": { - "dev": "nodemon --watch index.ts --exec esno index.ts", + "dev": "NODE_ENV=development nodemon --watch index.ts --exec esno index.ts", "build": "esbuild index.ts --format=cjs --platform=node --bundle --minify --outfile=index.js", "lint": "eslint **/*.ts" },