Merge pull request #665 from addo37/fix-replies-wiki
Change sender to silent for the usage of forceReply in wiki
This commit is contained in:
commit
8e97852ee1
@ -32,7 +32,7 @@ public Ability playWithMe() {
|
|||||||
.privacy(PUBLIC)
|
.privacy(PUBLIC)
|
||||||
.locality(ALL)
|
.locality(ALL)
|
||||||
.input(0)
|
.input(0)
|
||||||
.action(ctx -> sender.forceReply(playMessage, ctx.chatId()))
|
.action(ctx -> silent.forceReply(playMessage, ctx.chatId()))
|
||||||
// The signature of a reply is -> (Consumer<Update> action, Predicate<Update>... conditions)
|
// The signature of a reply is -> (Consumer<Update> action, Predicate<Update>... conditions)
|
||||||
// So, we first declare the action that takes an update (NOT A MESSAGECONTEXT) like the action above
|
// 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
|
// The reason of that is that a reply can be so versatile depending on the message, context becomes an inefficient wrapping
|
||||||
@ -40,7 +40,7 @@ public Ability playWithMe() {
|
|||||||
// Prints to console
|
// Prints to console
|
||||||
System.out.println("I'm in a reply!");
|
System.out.println("I'm in a reply!");
|
||||||
// Sends message
|
// 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
|
// 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!
|
// That class contains out-of-the-box predicates for your replies!
|
||||||
|
Loading…
Reference in New Issue
Block a user