public override System.Object Handle(System.Int32 request, TelegramBotClient botClient, System.Object message) { if (request == (System.Int32)SetChain.LinkChatPharase) { Message _message = message as Message; DataBase db = Singleton.GetInstance().Context; if (SearchChannel(_message)) { return(null); } GetUser(_message); ChangeUser(); SendMessage(botClient, _message); AnaliticsPhrase[] analyticsTexts = db.GetAnaliticsPharse(); PrintExel.GetAnaliticsInOneChatPharase(analyticsTexts, channel, botClient, _message, user); return(null); } else { return(base.Handle(request, botClient, message)); } }
public override void Execute(TelegramBotClient botClient, System.Object message) { IStandartCommand standartCommand = new ThisIncomeChannel(); if (standartCommand.SetCallbackQuery(message, out _message)) { return; } if (standartCommand.SetDataBase(out db)) { return; } if (standartCommand.SetUserAndCheckIsNull(botClient, _message, out user, db)) { return; } if (IsBan.Ban(botClient, message)) { if (user.IsAdmin >= 2) { SendMessage(botClient); IncomeChannel[] income = db.GetIncomeChannels(); PrintExel.GetAnaliticsIncomeChannel(income, botClient, _message, user); } } }