A Discord bot that connects with AniList to do multiple tasks based on a user's AniList profile.
This project was made as an testing ground for me to exeriment with AI, I do try to maintain the repo on my own though
This bot is not affiliated with Anilist nor Discord
Some parts of this repo are AI-Generated
- Fetches a random anime from an Anilist account.
- Generates stats from an Anilist Account.
- Generates a recomendation based on an Anilist account and fetches it.
- Interactive slash commands with error handling for invalid usernames or empty lists.
- Has a built-in prometheus endpoint and decent logging.
- Node.js version 23 or later installed or Docker with docker compose.
- A Discord bot token. Create one on the Discord Developer Portal.
- Install dependencies NodeJS Only:
pnpm install
-
Create a .env file with the example
cp .env.example .env
-
Modify environment variables in the .env
-
Make sure your bot has the required Discord permissions:
- Slash commands
- Read and send messages in the target channels.
Start the bot by running:
node start
or
docker compose up -d
The bot will log in and register the commands in all the servers it's added to.
- Use the
/random_anime
command in Discord and provide your AniList username. - The bot will fetch a random anime from your AniList and display its details in an embed.
- Use the
/anime_recommend
command in Discord and provide your AniList username. - The bot generate recomendations based on your anilist and pick one out of five anime and display its details in an embed.
- Use the
/anime_stats
command in Discord and provide your AniList username. - The bot will generate stats from your AniList and display them an embed.
- Node.js version 23 or later installed.
- A Discord bot token. Create one on the Discord Developer Portal.
- Install dependencies:
pnpm install
-
Create a .env file with the example
cp .env.example .env
-
Modify environment variables in the .env
-
Make sure your bot has the required Discord permissions:
- Slash commands
- Read and send messages in the target channels.
Start the bot by running:
pnpm start
- The project uses:
- discord.js for Discord integration.
- Axios for AniList API requests.
- Slash commands for an interactive experience.
- Errors and logging are handled with a custom logger for better debugging.
- modules/ Custom modules used by main app
- app.js: Main application logic.
- logger.js: Logging module.
- metrics.js: Prometheus metrics module.
- .env: Stores sensitive configuration variables.
Contributions are welcome! Feel free to open issues or submit pull requests.
This project is licensed under the MIT License. See the LICENSE file for details.