Anibot is a discord bot that notifies user of latest releases from their favourite animes. This bot uses discord.js and data is fetched from SubsPlease RSS feed.
Made with TypeScript, MongoDB and NodeJS.
-
Visit Discord Developer Portal and create a bot. Choose basic permissions, atleast sending messages. Turn on all the Privileged Gateway Intents options inside "Bot" section.
-
Clone this repository to your machine and run
npm i
to install dependencies. -
Create .env file and place your discord tokens there. Example:
DISCORD_TOKEN= ""
CLIENT_ID= ""
GUILD_ID= ""
RELEASE_CHANNEL_ID= ""
DEV_CHANNEL_ID= ""
LOGS_CHANNEL_ID= ""
DB_CONNECTION_STRING= "" // mongodb connection, see below
-
Create a MongoDB Atlas account and create a cluster that has
series
database anddata
collection in there. Press connect, select drivers and copy theuri
value. Make sure to modify the<password>
to be your cluster password. -
You can list your favourite shows that you want to track to the
data
collection. Here's a list of airing shows. I recommend connecting with MongoDB compass to the datanase. The schema is the following:
{
"_id": {
"$oid": "64396564a26ce63fc6fc90ca"
},
"name": "Vinland Saga S2",
"latestEpisode": ""
}
where id
will be generated automatically. You need to create name
and latestEpisode
keys, you can leave latestEpisode
empty. Both are strings.
-
Build the files with the command
tsc
. JavaScript files will be created to/dist
folder. -
Run
node dist/index.js
inside the repository. -
Done!
Note! Make sure to type names correctly, use rōmaji version of names. Season in title are shortened, like "Season 2" to "S2".
Click to see screenshots
Bot sending notification of a new release. Runs every five minutes automatically in the background.

/latest
command which responds with ten latest releases

Modify the these variables in functions/fetchAPI.ts
to your liking:
const timezone = "Europe/Helsinki";
const timeFormat = "en-FI";
Have you made sure that:
- you added the credentials to
.env
- mongodb connection is working
- mongodb schema is correct?
Create an issue! Feel free to fork this and improve it or modify it to your liking.