public override void Execute(TelegramBotClient botClient, System.Object message) { IStandartCommand standartCommand = new GetAnaliticsInOneChatWord(); 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)) { ChangeUser(); SendMessage(botClient); } }
public override async void Execute(TelegramBotClient botClient, System.Object message) { CallbackQuery _message = message as CallbackQuery; DataBase db = Singleton.GetInstance().Context; BotCore.InlineButton inlineButton = new BotCore.InlineButton(); try { if (IsBan.Ban(botClient, message)) { User user = db.GetUser(_message.From.Id); if (IsNullDataBase.IsNull(botClient, _message, user)) { return; } System.String temp = InfoUser.Info(user); if (user.IsAdmin == 0) { await botClient.EditMessageTextAsync(_message.From.Id, _message.Message.MessageId, temp, Telegram.Bot.Types.Enums.ParseMode.Html, replyMarkup : inlineButton.Accaunt); } else { await botClient.EditMessageTextAsync(_message.From.Id, _message.Message.MessageId, temp, Telegram.Bot.Types.Enums.ParseMode.Html, replyMarkup : inlineButton.AdminAccaunt); } } } catch (System.Exception ex) { Log.Logging(ex); } }
public override void Execute(TelegramBotClient botClient, System.Object message) { IStandartCommand standartCommand = new BackToAddAdversting(); ISplitName splitName = new BackToAddAdversting(); if (standartCommand.SetCallbackQuery(message, out _message)) { return; } if (standartCommand.SetDataBase(out db)) { return; } if (standartCommand.SetUserAndCheckIsNull(botClient, _message, out user, db)) { return; } Int32 idPostTemplate = splitName.GetNameSplit(Name); Name = CommandsText.BackToAddAdversting; if (IsBan.Ban(botClient, message)) { if (GetPostTemplate(idPostTemplate)) { return; } ChangeUser(); SendMessage(botClient); } }
public override void Execute(TelegramBotClient botClient, System.Object message) { IStandartCommand standartCommand = new ChuseAdmin(); ISplitName splitName = new ChuseAdmin(); if (standartCommand.SetCallbackQuery(message, out _message)) { return; } if (standartCommand.SetDataBase(out db)) { return; } if (standartCommand.SetUserAndCheckIsNull(botClient, _message, out user, db)) { return; } Int32 id = splitName.GetNameSplit(Name); Name = CommandText.ChuseAdmin; if (IsBan.Ban(botClient, message)) { if (SetUserTwo(id)) { return; } SendMessage(botClient); } }
public override void Execute(TelegramBotClient botClient, System.Object message) { IStandartCommand standartCommand = new AnaliticsShow(); 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 >= 1) { SendMessage(botClient); } } }
public override void Execute(TelegramBotClient botClient, System.Object message) { IStandartCommand standartCommand = new GetAnaliticsPharase(); 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)) { SendMessage(botClient); AnaliticsPhraseAllChat[] analyticsTexts = db.GetAnaliticsPhraseAllChats(); PrintExel.GetAnaliticsPharase(analyticsTexts, botClient, _message, user); } }
public override async void Execute(TelegramBotClient botClient, System.Object message) { CallbackQuery _message = message as CallbackQuery; DataBase db = Singleton.GetInstance().Context; await Task.Run(() => DeleteMessage(botClient, _message)); try { if (IsBan.Ban(botClient, message)) { User user = db.GetUser(_message.From.Id); if (IsNullDataBase.IsNull(botClient, _message, user)) { return; } AdUser adUser = db.GetAdUser(user.ID); adUser.EditingPostTemplateId = -1; db.Save(); InlineKeyboardMarkup answer = InlineButton.GetAdvertising(user); await botClient.EditMessageTextAsync(_message.From.Id, _message.Message.MessageId, "📞Ваша реклама📞", Telegram.Bot.Types.Enums.ParseMode.Html, replyMarkup : answer); } } catch (System.Exception ex) { Log.Logging(ex); } }
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); } } }
public override void Execute(TelegramBotClient botClient, System.Object message) { IStandartCommand standartCommand = new AddUserInChannel(); 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)) { SendMessage(botClient); InvitedUser[] analyticsTexts = db.GetInvitedUsers(); PrintExel.GetAllUsers(botClient, _message, user); } }
public void SendMessage(TelegramBotClient botClient) { InlineButton inlineButton = new InlineButton(); Settings settings = db.GetSettings(); String Text = $"Информация о компании!\n{settings.Regulations}"; if (IsBan.Ban(botClient, _message) == true) { botClient.EditMessage(user.ID, user.MessageID, Text, "39 - AddPhotoInDataBase", user, inlineButton.BackToAccauntMenu); } }
public override async void Execute(TelegramBotClient botClient, System.Object message) { IStandartCommand standartCommand = new BackToContentKeyboard(); ISplitName splitName = new BackToContentKeyboard(); if (standartCommand.SetCallbackQuery(message, out _message)) { return; } if (standartCommand.SetDataBase(out db)) { return; } if (standartCommand.SetUserAndCheckIsNull(botClient, _message, out user, db)) { return; } Int32 idPostTemplate = splitName.GetNameSplit(Name); Name = CommandsText.BackToContentKeyboard; if (IsBan.Ban(botClient, message)) { if (GetPostTemplate(idPostTemplate)) { return; } ChangeUser(); try { AdUser adUser = db.GetAdUser(user.ID); PostTemplate postTemplate = db.GetTempalte(adUser.User.ID, adUser.EditingPostTemplateId); SendMessage(botClient); } catch (System.Exception ex) { Log.Logging(ex); } } }
public override async void Execute(TelegramBotClient botClient, System.Object message) { CallbackQuery _message = message as CallbackQuery; try { if (IsBan.Ban(botClient, message)) { InlineKeyboardMarkup answer = InlineButton.GetChat(); await botClient.EditMessageTextAsync(_message.From.Id, _message.Message.MessageId, "Чаты: ", Telegram.Bot.Types.Enums.ParseMode.Html, replyMarkup : answer); } } catch (System.Exception ex) { Log.Logging(ex); } }
public override async void Execute(TelegramBotClient botClient, System.Object message) { CallbackQuery _message = message as CallbackQuery; DataBase db = Singleton.GetInstance().Context; try { if (IsBan.Ban(botClient, message)) { AdUser adUser = db.GetAdUser(_message.From.Id); if (IsNullDataBase.IsNull(botClient, _message, adUser)) { return; } await botClient.EditMessageTextAsync(_message.From.Id, _message.Message.MessageId, "Ваш баланс: " + adUser.Balance + " грн", replyMarkup : InlineButton.Balance); } } catch (System.Exception ex) { Log.Logging(ex); } }
public override async void Execute(TelegramBotClient botClient, System.Object message) { CallbackQuery _message = message as CallbackQuery; DataBase db = Singleton.GetInstance().Context; User user = db.GetUser(_message.From.Id); if (IsNullDataBase.IsNull(botClient, _message, user)) { return; } if (IsBan.Ban(botClient, message)) { if (user.IsAdmin >= 2) { try { await botClient.EditMessageTextAsync(_message.From.Id, _message.Message.MessageId, "Реклама", replyMarkup : InlineButton.AdvertisingShowAdmin); } catch (System.Exception ex) { Log.Logging(ex); } } else { try { await botClient.EditMessageTextAsync(_message.From.Id, _message.Message.MessageId, "Реклама", replyMarkup : InlineButton.AdvertisingShow); } catch (System.Exception ex) { Log.Logging(ex); } } } }