-
Create an app and a bot in the Discord Developer Portal.
-
Ensure the bot "user account" is added to your Discord server.
-
Install NodeJS.
-
Download this repo.
-
Create a text file named
.env
(literally.env
nothing before the dot) in the root directory of the downloadedtgd-streakbot
repo. -
Edit the
.env
file in a plain-text editor like notepad. At minimum writeBOT_SECRET=[bot token]
, replacing [bot token] with the bot's secret token copied from the Discord dev portal.Example
.env
contents:# REQUIRED CONFIG BOT_SECRET=**************************** # OPTIONAL CONFIG channelName=daily-standup dayStartHour=0 dayStartMinute=0 morningAnnouncementHour=7 morningAnnouncementMinute=0 midDayReminderHour=12 midDayReminderMinute=0 midWeekSummaryHour=13 midWeekSummaryMinute=0 midWeekDayOfWeek=3
-
Save and close the
.env
file. -
Navigate a command prompt to the root directory of the downloaded
tgd-streakbot
repo. -
Run the command:
npm install
-
Run the command:
node .
-
The command prompt should say "Logged in as TGD StreakBot". The bot should appear in the server's user list as online.
-
Leave the command prompt open for as long as you want the bot to run.
As users post messages, the bot will create and update a file named db.json. You can modify or delete this file yourself, but you need to restart the bot to handle changes you make. Either close the command prompt and start a new one, or input Ctrl+C to kill the bot, then run the "node ." command again.
You can change the channel this bot operates in, as well as the hour and minute that it considers the day to start at. These are constant values near the top of the code in bot.js. You'll need to restart the bot for it to detect these changes.