Skip to content

Commit 60044bd

Browse files
committed
Added example class
1 parent 8fb4e4f commit 60044bd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

examples/long-polling/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<dependency>
1717
<groupId>io.github.natanimn</groupId>
1818
<artifactId>telebof</artifactId>
19-
<version>0.9.5</version>
19+
<version>1.0.0</version>
2020
</dependency>
2121
</dependencies>
2222
<properties>

examples/long-polling/src/main/java/io/github/natanimn/WelcomeBot.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public WelcomeBot(String token){
3939
this.bot = new BotClient(token);
4040
var botIsAdmin = new BotIsAdmin(bot);
4141

42-
bot.onMessage(filter -> filter.commands("start"), this::startPrivate);
42+
bot.onMessage(filter -> filter.commands("start") && filter.Private(), this::startPrivate);
4343
bot.onMessage(filter -> filter.newChatMember() && filter.customFilter(botIsAdmin), this::sendWelcomeMessage);
4444
bot.onMessage(filter -> filter.leftChatMember() && filter.customFilter(botIsAdmin), this::deleteLeftMessage);
4545
bot.onMyChatMember(_ -> true, this::botPromoted);

0 commit comments

Comments
 (0)