This is a script/bot capable of scraping Genshin Impact event information from the Genshin Impact Fandom Wiki, then formatting and sending it to a Discord channel. The Channel and necessary Roles are handled and managed automatically by the bot.
On launch, the bot will check if necessary Channels and Roles exist, creating them if missing, then will wipe the alert channel by deleting and rebuilding it. Ideally the bot would be run once per day as a cron job or schedueled task, to make this easier a run.ps1
and run.sh
script are provided to use for launching the bot, these scripts specifically handle working directory changes to keep relative paths in tact and can be used as examples or in deployment.
Important
The bot is only meant to run on one server at a time and requires that you make a bot application/account with the Discord Developer Portal. You will need the bot token and invite link with permissions=268692528&scope=bot
for permissions and scope.
- Clone the project or download a release
- Install dependencies with npm by executing
npm install
- Create a
.env
file with your Discord Bot Token (use the.env-example
file as a guide) - Build project with
npm run build
- Execute
npm run start
- Or execute
run.ps1
orrun.sh
from any directory