public async Task ImportByUserNameAndSendMessage() { var store = new FileSessionStore(); var client = new TelegramClient(store, "session"); await client.Connect(); Assert.IsTrue(client.IsUserAuthorized()); var res = await client.ImportByUserName(UserNameToSendMessage); Assert.IsNotNull(res); await client.SendMessage(res.Value, "Test message from TelegramClient"); }