コード例 #1
0
 public TelegramBotHostedService(TelegramBotClient client, ITelegramResponseHandler responseHandler)
 {
     _client                        = client;
     _responseHandler               = responseHandler;
     _client.OnMessage             += OnMessageReceived;
     _client.OnCallbackQuery       += OnCallbackQuery;
     _client.OnReceiveError        += OnReceiveError;
     _client.OnReceiveGeneralError += OnReceiveGeneralError;
 }
コード例 #2
0
 public TelegramBotController(ITelegramResponseHandler responseHandler)
 {
     _responseHandler = responseHandler ?? throw new ArgumentNullException(nameof(responseHandler));
 }