Skip to content

Commit

Permalink
message added
Browse files Browse the repository at this point in the history
  • Loading branch information
mirdukkkkk committed Feb 17, 2024
1 parent ac6e87c commit f050551
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/commands/GameCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ class GameCommand extends PixelCommand {
}

const ended = (args[0] !== 'start');
const msg = await message.reply({ content: 'Смена игрового статуса в процессе...' });

const request = await fetch(`${message.client.config.api_domain}/game/change`, {
method: 'POST',
headers: {
Expand All @@ -53,7 +55,7 @@ class GameCommand extends PixelCommand {

if(request?.error ?? !request) return message.reply({ content: request ? codeBlock('json', JSON.stringify(request)) : 'От API поступил пустой ответ, возможно, стоит проверить его состояние' });

return message.reply({ content: `Игра была успешно ${ended ? 'завершена' : 'запущена'}` });
return msg.edit({ content: `Игра была успешно ${ended ? 'завершена' : 'запущена'}` });
} else {
const cooldown = Number(args[0]);
if(cooldown <= 0)
Expand Down

0 comments on commit f050551

Please sign in to comment.