clear command fix

This commit is contained in:
MaksSlyzar 2026-03-29 11:08:10 +03:00
parent f41eeb0e08
commit 82836c2ef3

View File

@ -61,7 +61,7 @@ module.exports = (io, socket) => {
case "/clear": { case "/clear": {
const [_, targetName] = args; const [_, targetName] = args;
const targetPlayer = await Player.findOne({ const targetPlayer = await Player.findOne({
where: { name: targetName }, where: { username: targetName },
}); });
if (!targetPlayer) throw new Error("Player not found."); if (!targetPlayer) throw new Error("Player not found.");