Skip to content

Commit

Permalink
✨ Add moment format
Browse files Browse the repository at this point in the history
  • Loading branch information
Androz2091 committed Oct 10, 2020
1 parent 3ce4255 commit e078d9b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
require("dotenv").config();
const fs = require("fs");
const moment = require("moment");
moment.locale("fr");

const pronote = require("pronote-api");

Expand Down Expand Up @@ -75,7 +77,7 @@ const sendDiscordNotificationHomework = (homework) => {
const embed = new Discord.MessageEmbed()
.setTitle(`${homework.subject.toUpperCase()}`)
.setDescription(homework.description)
.setTimestamp(homework.for)
.setFooter(`Devoir pour le ${moment(homework.for).format("dddd Do MMMM")}`)
.setColor("#70C7A4");

if(homework.files.length >= 1) {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"dependencies": {
"discord.js": "^12.0.2",
"dotenv": "^8.2.0",
"moment": "^2.29.1",
"pronote-api": "Litarvan/pronote-api"
},
"devDependencies": {
Expand Down

0 comments on commit e078d9b

Please sign in to comment.