我想在 C# 中使用 Telegram API 向频道发送多行消息。我使用 TLsharp,但无法发送表情符号和多行消息。
谁能给我一个代码?
private async void button3_Click(object sender, EventArgs e)
{
if (client.IsUserAuthorized()) { MessageBox.Show("You Logined!"); };
var dialogs = (TLDialogs)await client.GetUserDialogsAsync();
var chat = dialogs.chats.lists
.OfType<TLChannel>()
.SingleOrDefault(a => a.title == "AliGol");
await client.SendMessageAsync(new TLInputPeerChannel() { channel_id = chat.id, access_hash = chat.access_hash.Value }, "OUR_MESSAGE");
var fileResult = await client.UploadFile("C:\\a\\ali.jpg", new StreamReader("data/ali.jpg"));
await client.SendUploadedPhoto(new TLInputPeerChannel() { channel_id = chat.id, access_hash = chat.access_hash.Value }, fileResult, "MultiLine Message");
}