working nice
This commit is contained in:
parent
9939d027b9
commit
965ab54f20
4
build.sh
Normal file
4
build.sh
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
echo "Ce script ne s’exécute pas, il est là à titre d’exemple"
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
docker build . -t jeancloud/educbot:latest -t jeancloud/educbot:1.0.0 -t jeancloud/educbot:1.0
|
@ -30,5 +30,9 @@
|
|||||||
"dab": {
|
"dab": {
|
||||||
"prefix": ":dab:",
|
"prefix": ":dab:",
|
||||||
"description": "Dab"
|
"description": "Dab"
|
||||||
|
},
|
||||||
|
"fuck": {
|
||||||
|
"prefix": "🖕",
|
||||||
|
"description": "Je vous emmerde!"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
<link rel="stylesheet" href="main.css" />
|
<link rel="stylesheet" href="main.css" />
|
||||||
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
|
||||||
<script src="main.js"></script>
|
<script src="main.js"></script>
|
||||||
|
<title>Éduc-Bot, le bot d’éduc-pop</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<main id="educbotstatus">
|
<main id="educbotstatus">
|
||||||
|
7
index.js
7
index.js
@ -206,7 +206,7 @@ client.on('message', msg => {
|
|||||||
msg.reply(text)
|
msg.reply(text)
|
||||||
}
|
}
|
||||||
else if (msg.content === '!educpop-web') {
|
else if (msg.content === '!educpop-web') {
|
||||||
msg.reply('https://educbot.jean-cloud.net?channel_id=' + msg.channel.id + '&web_token=' + channel.web_token + '&ws_port=' + (process.env.EXT_WS_PORT || process.env.WS_PORT || '8080')
|
msg.reply('https://educbot.jean-cloud.net?channel_id=' + msg.channel.id + '&web_token=' + channel.web_token + '&ws_port=' + (process.env.EXT_WS_PORT || process.env.WS_PORT || '8080'))
|
||||||
}
|
}
|
||||||
/* save and ignore own messages */
|
/* save and ignore own messages */
|
||||||
else if(msg.author.username === process.env.BOT_USERNAME){
|
else if(msg.author.username === process.env.BOT_USERNAME){
|
||||||
@ -217,14 +217,15 @@ client.on('message', msg => {
|
|||||||
else if(msg.content.startsWith('-')) {
|
else if(msg.content.startsWith('-')) {
|
||||||
const content = msg.content.slice(1)
|
const content = msg.content.slice(1)
|
||||||
if (content.toLowerCase() in reactions) {
|
if (content.toLowerCase() in reactions) {
|
||||||
educpopDelPerson(channel, msg.member.nickname, content.toLowerCase())
|
//TODO est-ce qu’un nickname vide aura la valeur username ?
|
||||||
|
educpopDelPerson(channel, msg.member.nickname || msg.member.username, content.toLowerCase())
|
||||||
msg.delete()
|
msg.delete()
|
||||||
reply(channel)
|
reply(channel)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (msg.content.toLowerCase() in reactions) {
|
else if (msg.content.toLowerCase() in reactions) {
|
||||||
var reaction = msg.content.toLowerCase()
|
var reaction = msg.content.toLowerCase()
|
||||||
educpopAddPerson(channel, msg.member.nickname, msg.content.toLowerCase())
|
educpopAddPerson(channel, msg.author.nickname || msg.author.username, msg.content.toLowerCase())
|
||||||
msg.delete()
|
msg.delete()
|
||||||
reply(channel)
|
reply(channel)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user