Merhabalar,
Birtane telegram bot yazıyorum ama sadece grupta çalışıyor ben başka gruplardada çalışmasını istiyorum yani chatid okumalı benim yaptığım botun kanalına yazarsam gösterdiğim target'e cevap veriyor ama o targette yazınca cevaplamıyor
using System;
using Telegram.Bot;
using Telegram.Bot.Args;
namespace ConsoleApp1
{
class Program
{
private static ITelegramBotClient BotAdminChannel = new TelegramBotClient("GİZLİ ");
static **** Main(string[] args)
{
BotAdminChannel.OnMessage += BotAdminChannel_OnMessage;
Console.Title = BotAdminChannel.GetMeAsync().Result.FirstName;
BotAdminChannel.StartReceiving();
Console.ReadLine();
}
private async static **** BotAdminChannel_OnMessage(object sender, MessageEventArgs e)
{
await BotAdminChannel.SendTextMessageAsync(e.Message.Chat.Id, "hello user");
await BotAdminChannel.SendTextMessageAsync(-1001485390036, "How are you user", replyToMessageId: e.Message.MessageId);
}
}
}
Birtane telegram bot yazıyorum ama sadece grupta çalışıyor ben başka gruplardada çalışmasını istiyorum yani chatid okumalı benim yaptığım botun kanalına yazarsam gösterdiğim target'e cevap veriyor ama o targette yazınca cevaplamıyor
using System;
using Telegram.Bot;
using Telegram.Bot.Args;
namespace ConsoleApp1
{
class Program
{
private static ITelegramBotClient BotAdminChannel = new TelegramBotClient("GİZLİ ");
static **** Main(string[] args)
{
BotAdminChannel.OnMessage += BotAdminChannel_OnMessage;
Console.Title = BotAdminChannel.GetMeAsync().Result.FirstName;
BotAdminChannel.StartReceiving();
Console.ReadLine();
}
private async static **** BotAdminChannel_OnMessage(object sender, MessageEventArgs e)
{
await BotAdminChannel.SendTextMessageAsync(e.Message.Chat.Id, "hello user");
await BotAdminChannel.SendTextMessageAsync(-1001485390036, "How are you user", replyToMessageId: e.Message.MessageId);
}
}
}