🤖 This bot is designed to clean up the chat with some predefined rules.
Add SPECIFIC_CHANNEL
to your .env
file, where the value is the ID of the channel you want to clean.
- The bot will only clean up the channel you specify.
- If you don't specify a channel, the bot will clean up the current channel.
Add SPECIFIC_USER
to your .env
file, where the value is the ID of the user you want to clean.
- The bot will only clean up the user you specify.
- If you don't specify a user, the bot will clean up ANY user.
Clone project
git clone [email protected]:caiodomingues/cleaning-bot.git your-app-name
cd your-app-name
Install dependencies
# yarn
yarn install # or just yarn
# npm
npm install # or npm i
Create environment variable files .env
based on .env.example on project root folder
# linux / macOS
cp .env.example .env
# windows
copy .env.example .env
⚠ Remember to follow the Installation steps before proceeding
Running the bot
# yarn
yarn dev # or cross-env NODE_ENV=development env-cmd -f .env tsnd --transpile-only --respawn --no-notify --ignore-watch node_modules ./src/index.ts
# npm
npm run dev
⚠ Note that the loaded environment variables file is
.env
⚠ Remember to follow the Installation steps before proceeding
docker build -t your-app-name .
docker run -it --rm -e DISCORD_TOKEN="YOUR TOKEN HERE" --name your-app-name your-app-name
⚠ Remember to follow the Installation steps before proceeding
docker compose up -d
⚠ Note that the loaded environment variables file is
.env
⚠ Remember to follow the Installation steps before proceeding
Directly
# yarn
yarn deploy
# npm
npm run deploy
⚠ Note that the loaded environment variables file is
.env
Manually
# yarn
yarn build
# npm
npm run build
Startup bot
# yarn
yarn start # or cross-env NODE_ENV=production env-cmd -f .env node ./dist/index.js
# npm
npm run start
⚠ Note that the loaded environment variables file is
.env