This Discord bot regularly fetches news from https://tw.toram.jp/information and sends it to the Discord channel.
Follow Setting up a bot application | discord.js Guide (discordjs.guide) to create your Discord bot.
Go to Discord Developer Portal — My Applications.
Click on your bot application and open the Installation page.
Select Guild Install
.
Select the bot
scope.
Select Embed Links
, Send Messages
permissions.
Invite bot to the server by visiting the install link.
Go to Discord Developer Portal — My Applications.
Click on your bot application and open the General Information page.
Configure your own interaction endpoint URL.
Rename .env.example
to .env
and fill in your own.
DB_PATH=./data/toram-news.db
DENO_SQLITE_PATH=./lib/libsqlite3.so
# DENO_SQLITE_PATH=./lib/sqlite3.dll
APPLICATION_ID=
DISCORD_BOT_TOKEN=
DISCORD_PUBLIC_KEY=
mkdir data
docker run -d --name toram-news-discord-bot --restart always --memory 256m --env-file .env -p 127.0.0.1:3000:3000 -v ./data:/app/data ghcr.io/hchengting/toram-news-discord-bot
Use /subscribe
command in the channel.