2.1.9 • Published 2 years ago
discord-anime-scheduler v2.1.9
Discord Anime Scheduler
Notification when a new anime episode airs. Anilist.co
- This package use MongoDB.
- This package use DiscordJS v14.
- Npm : https://www.npmjs.com/package/discord-anime-scheduler
📁 Installation
npm i discord-anime-scheduler@latest
🚦 Initialize the Scheduler
// index.js
const client = new Client(...); // Discord#Client
const Scheduler = require('discord-anime-scheduler');
const sheduler = new Scheduler(client, {
log: false, // by default: false | Displays various information in the console.
mongoUri: "", // Required | MongoDB URI
autoPost: true // by default: true | Auto Send the notification in anime channel.
});
client.scheduler = scheduler;
// ready.js
client.scheduler.init(); // Init the scheduler ! If you don't initialize the scheduler, then it won't start.
🔧 Features
setChannel
Define the channel where notifications will be sent.
scheduler.setChannel(Guild, TextChannel);
addAnime
Add an anime to the anime list. Go to Anilist.co and get:
- Anime URL | Exemple: https://anilist.co/anime/21/ONE-PIECE
or
- Anime Name | Exemple: One Piece
or
Anime ID (is in url) | Exemple: 21
scheduler.addAnime(Guild, Anime<id|name|url>);
removeAnime()
Remove an anime from the anime list.
scheduler.removeAnime(Guild, Anime<id|name|url>)
.then(res => console.log(res));
list()
Get server anime list.
scheduler.list(Guild)
.then(list => console.log(list));
setMode()
Set notification mode.
Modes :
- all | Notifies all Anilist anime broadcasts.
- list (by default) | Notifies of anime broadcasts from the server's anime list only.
scheduler.setMode(Guild, Mode);
setRole()
Defines the role to be mentioned when notifying an anime on a specific server.
scheduler.setRole(Guild, Role);
delete()
Delete a server from the database.
scheduler.delete(Guild);
☎️ Contact
Discord : Zeleff_#1615