forgot to break the switch cases and also we don't redeclare the user variable anymore so better off being a constant

This commit is contained in:
Joonas 2023-02-09 17:06:34 +02:00
parent a7b43f7aa5
commit a53eb71470
1 changed files with 5 additions and 2 deletions

View File

@ -32,7 +32,7 @@ const command = {
mod: false,
run: async (client, msg, splitted) => {
const now = new Date().getTime();
let user = await prisma.user.findUnique({
const user = await prisma.user.findUnique({
where: {
userId: msg.senderUserID,
},
@ -76,6 +76,7 @@ const command = {
}
await client.say(msg.channelName, `${msg.displayName}, success`);
break;
}
case "cdr": {
@ -145,7 +146,7 @@ const command = {
`${msg.displayName}, no sleep tonight... (-15 megis: cooldown reset)`
);
return;
break;
}
default: {
@ -208,6 +209,8 @@ const command = {
msg.channelName,
`${msg.displayName}, +${megis} megis! ${megisTypes[megis]} Total megis: ${updateUser.megis.megis}`
);
break;
}
}
},