The kanrikun-bot
is a Discord bot designed for facility management tasks. Utilizing the Discord.js library, the bot monitors specific channels for users' reactions on messages. When a user reacts with a predefined emoji, the bot recognizes the type of task completed, such as vacuuming, kitchen cleaning, or washing, based on the emoji used. It then responds by sending a custom message embedded in a notification to a target channel, praising the user for their action.
Before running the bot, you'll need to set up your Discord token.
Install the recommended version 13 of discord.js to your local repository.
npm install discord.js@v13-lts
Create a new file named token.json
in the root directory of your project.
You can easily get the channel and role ID by setting dev mode in Discord app.
Copy and paste the following content into token.json
:
{
"DISCORD_BOT_TOKEN": "YOUR_DISCORD_BOT_TOKEN",
"MONITORED_DISCORD_CH_ID": "YOUR_DISCORD_CH_ID",
"TARGET_DISCORD_CH_ID": "YOUR_DISCORD_CH_ID",
"DISCORD_ROLE_ID": "YOUR_DISCORD_ROLE_ID"
}
Once you have set up your token in the token.json file, you can run your bot using the following command:
node kanri-kun.js