Compare commits

..

No commits in common. "c759779135b7eb554aea104458bc4551c7037244" and "1ccf4b3c5c3e7e48981bbe17bb20e125ceb857be" have entirely different histories.

4 changed files with 4 additions and 36 deletions

View File

@ -1,3 +0,0 @@
Dockerfile
node_modules
npm-debug.log

View File

@ -1,11 +0,0 @@
from node:alpine3.10
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install
COPY index.js avatar.jpg
EXPOSE 8080
CMD [ "node", "index.js" ]

View File

@ -150,7 +150,7 @@ const client = new Discord.Client();
client.on('ready', () => {
console.log('Connected to Discord as ' + client.user.tag);
client.user.setAvatar('avatar.png')
client.user.setUsername(process.env.BOT_USERNAME)
client.user.setUsername('Educ-Bot')
});
/* Discord message center */
client.on('message', msg => {
@ -203,21 +203,21 @@ client.on('message', msg => {
}
/* save and ignore own messages */
else if(msg.author.username === process.env.BOT_USERNAME){
if (!msg.content.startsWith('<')) /* Save if its educpop summary */
if (msg.content.startsWith(':')) /* Save if its educpop summary */
channel.last_msg = msg;
}
/* Educ pop stuff */
else if(msg.content.startsWith('-')) {
const content = msg.content.slice(1)
if (content.toLowerCase() in reactions) {
educpopDelPerson(channel, msg.member.nickname, content.toLowerCase())
educpopDelPerson(channel, msg.author.username, content.toLowerCase())
msg.delete()
reply(channel)
}
}
else if (msg.content.toLowerCase() in reactions) {
var reaction = msg.content.toLowerCase()
educpopAddPerson(channel, msg.member.nickname, msg.content.toLowerCase())
educpopAddPerson(channel, msg.author.username, msg.content.toLowerCase())
msg.delete()
reply(channel)
}

View File

@ -1,18 +0,0 @@
{
"name": "educ-bot",
"version": "1.0.0",
"description": "Un petit bot d'éduc pop pour Discord (WIP). Il permet de voir qui secoue les mains dans une discussion vocale.",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "ssh://git@git.jean-cloud.net:22529/theolem/educ-bot.git"
},
"author": "",
"license": "ISC",
"dependencies": {
"discord.js": "^12.1.1"
}
}