Updated README, fixed a couple bugs

This commit is contained in:
2021-03-18 04:38:44 +11:00
parent e60535c525
commit 7333fa4211
2 changed files with 20 additions and 12 deletions
+8
View File
@@ -229,6 +229,11 @@ const executeCommand = (io, socket, command) => {
}
case '/unmute': {
if (socket.user.privilege != 'administrator' && socket.user.privilege != 'moderator') {
socket.emit('message', { emphasis: true, text: '/unmute is only available to admins and mods' });
break;
}
const arr = command.split(' ');
arr.shift(); // /mute
const username = arr.shift();
@@ -237,6 +242,9 @@ const executeCommand = (io, socket, command) => {
where: {
username: {
[Op.eq]: username
},
until: {
[Op.gt]: new Date(Date.now())
}
}
});