This project is no longer up to date and may not work with the latest versions!!!
By @Corentin-k and @kevin-71.
Inspired by the Crobotic Association's bot whith the assistance of @Serquand
- Create a /planning command to retrieve schedule of somebody.
- Create a command that provides informations about a book. This command uses the Google API.
- Create a command that provides informations about a movie This command uses the OMBd API.
- Created a command that retrieves data of the book/movie command and saves it in a database.
- Adding librairies control system
Create a Git repository in a directory or download the zip file
git init
git clone https://github.com/Corentin-k/Bot.git
From a terminal (use the VS Code terminal):
npm install
npm install discord.js axios node-ical moment moment-timezone uuid
npm i -D @types/uuid
Install node.js by follow the steps at https://nodejs.org/fr
or with chocolatey using choco install nodejs
Create .env file and follow information in the file ".env.example".
- To create a discord bot --> https://discord.com/developers/ and obtain a Token bot.
⚠️ NEVER share the token on the internet or push it to Github.
-
To get the ID of the discord server :
Server Settings> widget>SERVER ID
-
To retrieves the ID of the discord channel :
Right-click on the channel > Copy Channel ID
💡 An API key is required to access the /livre and /film commands.
- Obtain the Google API key from https://developers.google.com/books?hl=fr for the/livre command.
- Obtain the OMDb API key from https://www.omdbapi.com/ for the /film command.
Enter the following command:
npx nodemon
and wait to have this message : "Bot launched !"
⚠️ If the bot doesn't work type the following command in the terminal:npm install -g npm
.