Skip to content

Commit

Permalink
Update ClearCommand.js
Browse files Browse the repository at this point in the history
  • Loading branch information
mirdukkkkk committed Dec 1, 2023
1 parent 7770f51 commit 305416d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/commands/ClearCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class ClearCommand extends PixelCommand {
constructor() {
super('clear', {
cooldown: 5,
aliases: []
aliases: ['clr']
});
}

Expand All @@ -26,9 +26,10 @@ class ClearCommand extends PixelCommand {
token: message.client.config.insideToken,
color
})
}).then(async res => await res.json());
}).then(res => res.json());

if(data?.error ?? !data) return msg.edit({ content: 'API PixelBattle недоступно в данный момент, регенерация холста не возможна' });
if(data?.error ?? !data)
return msg.edit({ content: 'API PixelBattle недоступно в данный момент, регенерация холста не возможна' });

return msg.edit({ content: `Холст ${data.canvas.width}x${data.canvas.height} был успешно очищен! Как его цвет был установлен - \`${color}\`` });
}
Expand Down

0 comments on commit 305416d

Please sign in to comment.