From b3c6623eaa8e4bc96a0802af4e2075b4783049c8 Mon Sep 17 00:00:00 2001 From: Abbas Abou Daya Date: Mon, 16 Sep 2019 22:44:33 -0700 Subject: [PATCH 1/2] Change sender to silent for the usage of forceReply in wiki --- TelegramBots.wiki/abilities/Using-Replies.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TelegramBots.wiki/abilities/Using-Replies.md b/TelegramBots.wiki/abilities/Using-Replies.md index 82307360..5ca5f1b8 100644 --- a/TelegramBots.wiki/abilities/Using-Replies.md +++ b/TelegramBots.wiki/abilities/Using-Replies.md @@ -32,7 +32,7 @@ public Ability playWithMe() { .privacy(PUBLIC) .locality(ALL) .input(0) - .action(ctx -> sender.forceReply(playMessage, ctx.chatId())) + .action(ctx -> silent.forceReply(playMessage, ctx.chatId())) // The signature of a reply is -> (Consumer action, Predicate... conditions) // So, we first declare the action that takes an update (NOT A MESSAGECONTEXT) like the action above // The reason of that is that a reply can be so versatile depending on the message, context becomes an inefficient wrapping From 7b7478f180eccad0b361dfb81221aec60fc0474b Mon Sep 17 00:00:00 2001 From: Abbas Abou Daya Date: Mon, 16 Sep 2019 22:48:22 -0700 Subject: [PATCH 2/2] Another sender to silent change --- TelegramBots.wiki/abilities/Using-Replies.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TelegramBots.wiki/abilities/Using-Replies.md b/TelegramBots.wiki/abilities/Using-Replies.md index 5ca5f1b8..0067a67b 100644 --- a/TelegramBots.wiki/abilities/Using-Replies.md +++ b/TelegramBots.wiki/abilities/Using-Replies.md @@ -40,7 +40,7 @@ public Ability playWithMe() { // Prints to console System.out.println("I'm in a reply!"); // Sends message - sender.send("It's been nice playing with you!", upd.getMessage().getChatId()); + silent.send("It's been nice playing with you!", upd.getMessage().getChatId()); }, // Now we start declaring conditions, MESSAGE is a member of the enum Flag class // That class contains out-of-the-box predicates for your replies!