Add random
This commit is contained in:
parent
c0b0301cb4
commit
af46dbe003
1 changed files with 4 additions and 2 deletions
2
bot.go
2
bot.go
|
|
@ -7,6 +7,7 @@ import (
|
|||
"fmt"
|
||||
"log"
|
||||
"math"
|
||||
"math/rand"
|
||||
"net/http"
|
||||
"os"
|
||||
"regexp"
|
||||
|
|
@ -397,6 +398,7 @@ func handleNewMessage(ctx context.Context, api *tg.Client, alertPeer *tg.InputPe
|
|||
_, err = api.MessagesSendMessage(ctx, &tg.MessagesSendMessageRequest{
|
||||
Peer: alertPeer,
|
||||
Message: matchMessage,
|
||||
RandomID: rand.Int63(),
|
||||
})
|
||||
if err != nil {
|
||||
log.Printf("Failed to send alert message: %v", err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue