public Task <bool> HandleAsync(IIncomingMessage message, IVityaBot bot) { return(bot.SendMessageAsync(new OutgoingMessage() { peer_id = message.peer_id, message = string.Format("Твоя картинка говно") })); }
public Task <bool> HandleAsync(IIncomingMessage message, IVityaBot bot) { return(bot.SendMessageAsync(new OutgoingMessage() { peer_id = message.peer_id, message = string.Format("Все говорят {0}, а ты пошел на хуй", message.text) })); }
public override async Task handleAsync(IIncomingMessage message, IVityaBot bot, Match match) { var outgoingMessage = new Models.OutgoingMessage() { peer_id = message.peer_id, message = $"bot test mode is {bot.mode.ToString()}" }; await bot.SendMessageAsync(outgoingMessage); }
public override async Task handleAsync(IIncomingMessage message, IVityaBot bot, Match match) { var outgoingMessage = new Models.OutgoingMessage() { peer_id = message.peer_id, message = $"Бэтмен {Generator.generate(SwearWordGenerator.Type.Adjective, 2, Sex.M, Case.I)} {Generator.generate(SwearWordGenerator.Type.Noun, 2, Sex.M, Case.I)}" }; await bot.SendMessageAsync(outgoingMessage); }
public override async Task handleAsync(IIncomingMessage message, IVityaBot bot, Match match) { bot.mode = Enum.Parse <VKBot.VkBot.Mode>(match.Groups[1].Value); var outgoingMessage = new Models.OutgoingMessage() { peer_id = message.peer_id, message = $"bot test mode is {bot.mode.ToString()}" }; await bot.SendMessageAsync(outgoingMessage); }
public override async Task handleAsync(IIncomingMessage message, IVityaBot bot, Match match) { var peers = VkontakteBot.Services.DataService.activeMemes.Select(t => t.Id + " - " + t.title + " - " + t.description); var outgoingMessage = new Models.OutgoingMessage() { peer_id = message.peer_id, message = string.Join("\n", peers) }; await bot.SendMessageAsync(outgoingMessage); }
public override async Task handleAsync(IIncomingMessage message, IVityaBot bot, Match match) { var outgoingMessage = new Models.OutgoingMessage() { peer_id = message.peer_id, //message = text, attachment = Services.DataService.pictures["joke"], //group_id = message. }; await bot.SendMessageAsync(outgoingMessage); }
public async Task <bool> HandleAsync(IIncomingMessage message, IVityaBot bot) { foreach (var attach in message.attachments.Where(x => x.type == "audio")) { await bot.SendMessageAsync(new OutgoingMessage() { peer_id = message.peer_id, message = string.Format("{0} говно", attach.audio.artist) }); } return(true); }
public async Task <bool> HandleAsync(IIncomingMessage message, IVityaBot bot) { foreach (var attach in message.attachments.Where(x => x.type == "wall")) { await bot.SendMessageAsync(new OutgoingMessage() { peer_id = message.peer_id, message = string.Format("Опять всякое говно репостим") }); } return(true); }
public override async Task handleAsync(IIncomingMessage message, IVityaBot bot, Match match) { var memes = VkontakteBot.Services.DataService.activeMemes; foreach (var meme in memes) { await bot.processMemeByIdAsync(message.peer_id, meme.Id, meme.title + ";" + meme.description); } var outgoingMessage = new Models.OutgoingMessage() { peer_id = message.peer_id, message = $"test memes finished" }; await bot.SendMessageAsync(outgoingMessage); }
public override async Task handleAsync(IIncomingMessage message, IVityaBot bot, Match match) { var peerId = match.Groups[1].Value; var text = match.Groups[2].Value; if (!string.IsNullOrEmpty(text)) { var outgoingMessage = new Models.OutgoingMessage() { peer_id = peerId, message = text }; await bot.SendMessageAsync(outgoingMessage); } }
public async Task <HandlerResult> HandleAsync(IIncomingMessage message, IVityaBot bot) { var outgoingMessage = new OutgoingMessage() { peer_id = message.peer_id, //message = text, attachment = Services.DataService.pictures["communityLike"], //group_id = message. }; await bot.SendMessageAsync(outgoingMessage); return(new HandlerResult() { message = "ok" }); }
public override async Task handleAsync(IIncomingMessage message, IVityaBot bot, Match match) { var memeId = match.Groups[1].Value; var memes = VkontakteBot.Services.DataService.activeMemes; var meme = memes.FirstOrDefault(t => t.Id == memeId); if (meme != null) { await bot.processMemeByIdAsync(message.peer_id, meme.Id, meme.title + ";" + meme.description); } var outgoingMessage = new Models.OutgoingMessage() { peer_id = message.peer_id, message = $"test {memeId} finished" }; await bot.SendMessageAsync(outgoingMessage); }