test
This commit is contained in:
parent
109f38e470
commit
a2b294b708
2
job.go
2
job.go
@ -1384,6 +1384,8 @@ func jobGWithdraw(j Job) {
|
|||||||
doneTab map[int64]int64
|
doneTab map[int64]int64
|
||||||
)
|
)
|
||||||
|
|
||||||
|
log.Printf("jobGWithdraw[%d] : test %d / %d.\n", j.ID64, botUserID64, bot.Me.ID)
|
||||||
|
|
||||||
log.Printf("jobGWithdraw[%d] : Starting.\n", j.ID64)
|
log.Printf("jobGWithdraw[%d] : Starting.\n", j.ID64)
|
||||||
|
|
||||||
reqTab = make(map[int64]int64)
|
reqTab = make(map[int64]int64)
|
||||||
|
7
main.go
7
main.go
@ -21,8 +21,9 @@ var (
|
|||||||
config = flag.String("config", "config.json", "config file path")
|
config = flag.String("config", "config.json", "config file path")
|
||||||
initdb = flag.Bool("initdb", false, "initialize bot database")
|
initdb = flag.Bool("initdb", false, "initialize bot database")
|
||||||
|
|
||||||
db *sql.DB
|
db *sql.DB
|
||||||
bot *tb.Bot
|
bot *tb.Bot
|
||||||
|
botUserID64 int64
|
||||||
|
|
||||||
cr *cron.Cron
|
cr *cron.Cron
|
||||||
|
|
||||||
@ -102,6 +103,8 @@ func main() {
|
|||||||
URL: cfg.Telegram.URL,
|
URL: cfg.Telegram.URL,
|
||||||
Poller: &tb.LongPoller{Timeout: 10 * time.Second},
|
Poller: &tb.LongPoller{Timeout: 10 * time.Second},
|
||||||
})
|
})
|
||||||
|
botUserID64 = int64(bot.Me.ID)
|
||||||
|
|
||||||
failOnError(err, "Registering bot")
|
failOnError(err, "Registering bot")
|
||||||
log.Println("Bot registered")
|
log.Println("Bot registered")
|
||||||
|
|
||||||
|
2
rules.go
2
rules.go
@ -25,7 +25,7 @@ func resetMsgParsingRules() error {
|
|||||||
Rule: "^To validate (@[A-Za-z0-9]*) withdrawal of\n([0-9]+ x .*\n)+(Click /withdraw_[a-f0-9]{32})$",
|
Rule: "^To validate (@[A-Za-z0-9]*) withdrawal of\n([0-9]+ x .*\n)+(Click /withdraw_[a-f0-9]{32})$",
|
||||||
MsgTypeID64: cacheObjSubType[`msg_guild_gwithdraw_req`],
|
MsgTypeID64: cacheObjSubType[`msg_guild_gwithdraw_req`],
|
||||||
ChatID64: cfg.Bot.Mainchat,
|
ChatID64: cfg.Bot.Mainchat,
|
||||||
SenderUserID64: 0,
|
SenderUserID64: botUserID64,
|
||||||
}
|
}
|
||||||
rules2 = append(rules2, r)
|
rules2 = append(rules2, r)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user