|
@@ -4,7 +4,6 @@ using Telegram.Bot.Types;
|
|
|
using Telegram.Bot.Types.Enums;
|
|
|
using Telegram.Bot.Types.ReplyMarkups;
|
|
|
|
|
|
-
|
|
|
namespace MafiaTelegramBot.Models.Commands
|
|
|
{
|
|
|
public class ConnectGameCommand : Command
|
|
@@ -18,7 +17,8 @@ namespace MafiaTelegramBot.Models.Commands
|
|
|
var userId = update.Message.From.Id;
|
|
|
|
|
|
var user = await UserDao.GetUserById(userId);
|
|
|
-
|
|
|
+ if (user?.GetCurrentGame() != "")
|
|
|
+ return await Bot.SendWithMarkdown2(chatId, $"{strings.user_already_playing} _*{user?.GetCurrentGame()}*_");
|
|
|
var inlineKeyboard = new InlineKeyboardMarkup(new[]
|
|
|
{
|
|
|
new[] {InlineKeyboardButton.WithCallbackData(strings.connect_to_public_room, $"{strings.connect_to_public_room_callback}|{userId}")},
|