【发布时间】:2020-08-03 20:43:20
【问题描述】:
我不能这样做
public static void myBot_OnMessage(object sender, Telegram.Bot.Args.MessageEventArgs msg)
{
if (DateTime.Now.Hour == 01)
{
myBot.SendTextMessageAsync(msg.Message.Chat.Id, "Good Night");
}
}
因为这要求用户首先在该确切时间发送消息,以便他们接收消息。我怎样才能让它自动向任何启动它的人自动发送消息,而无需该人在发送自动消息的确切时间发送消息?
【问题讨论】:
标签: c# telegram telegram-bot