Skip to content

Commit 5cb9224

Browse files
authored
Merge pull request #3 from phpgeeks-club/dimns-patch-2
Fixed a command search error inside the text
2 parents 3250dcf + c145c79 commit 5cb9224

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func main() {
4848
}
4949

5050
for _, command := range commands {
51-
if strings.Contains(update.Message.Text, command) {
51+
if update.Message.Text == command || strings.Contains(update.Message.Text, " "+command+" ") {
5252
switch command {
5353
case "/help", "/хелп":
5454
message = `БОТ РАБОТАЕТ ТОЛЬКО У АДМИНОВ.

0 commit comments

Comments
 (0)