Пример #1
0
        private static string AcceptJoin(long userId, string username)
        {
            var result  = GameCore.AcceptJoin(userId, username, out var chatId);
            var gameNum = $"№{-chatId:X}";

            switch (result)
            {
            case Response.JoiningStatus.ConfirmationSuccess:
                Say(string.Format(Replic.PublicJoinSuccess, username, gameNum), chatId);
                return(string.Format(result.GetDescription(), gameNum));

            case Response.JoiningStatus.PlayerAlreadyPlaying:
            case Response.JoiningStatus.PlayerAlreadyJoined:
                return(string.Format(result.GetDescription(), username));

            default:
                return(result.GetDescription());
            }
        }