damn
This commit is contained in:
parent
1638a44797
commit
bba0b1bce0
2 changed files with 14 additions and 2 deletions
14
index.ts
14
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({
|
||||
|
|
|
@ -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"
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue