Add fart
This commit is contained in:
parent
3a893d202e
commit
5937df3d40
4
index.js
4
index.js
@ -79,6 +79,10 @@ io.on("connection", (client) => {
|
||||
messagesHistory.shift();
|
||||
}
|
||||
|
||||
} else if(data.message === "/prout") {
|
||||
io.sockets.emit("fart");
|
||||
log(`${client.denisFanNumber} : have farted`);
|
||||
|
||||
} else {
|
||||
client.emit("warning");
|
||||
log(`${client.denisFanNumber} : ${data.message} (INVALID)`);
|
||||
|
BIN
src/fart.mp3
Normal file
BIN
src/fart.mp3
Normal file
Binary file not shown.
@ -73,6 +73,7 @@
|
||||
<img id="close" src="./images/cross.png">
|
||||
</div>
|
||||
<audio id="ringtone" src="./ringtone.mp3"></audio>
|
||||
<audio id="fart" src="./fart.mp3"></audio>
|
||||
<script src="https://danby.aniere.fr:3000/socket.io/socket.io.js"></script>
|
||||
<script src="https://unpkg.com/swiper@8/swiper-bundle.min.js"></script>
|
||||
<script src="script.js"></script>
|
||||
|
@ -55,6 +55,10 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||
location.reload();
|
||||
});
|
||||
|
||||
socket.on("fart", () => {
|
||||
document.getElementById("fart").play();
|
||||
})
|
||||
|
||||
|
||||
socket.on("previous-messages", (data) => {
|
||||
data.messages.forEach(message => {
|
||||
|
Loading…
Reference in New Issue
Block a user