예제 #1
0
 internal void TextMessage(long userId, Message message, ref Ref <string> rezult)
 {
     if (!modelUser.TryIfExist(userId))
     {
         if (message.Text == "/start")
         {
             if (message.From.Username == "" || message.From.Username == null)
             {
                 SendOneMessage(userId, view.createNewUserEmptyUsername, null);
             }
             else
             {
                 UserDB person = modelUser.CreateNewUser(userId, message.Chat.Username);
                 SendOneMessage(userId, view.createNewUserSucces, null);
                 rezult.Value = view.createdNewUser(person);
             }
         }
         else
         {
             SendOneMessage(userId, "What? I dont understand. Write /start", null);
         }
     }
     return;
 }