test
This commit is contained in:
parent
4a1b9f531c
commit
aed75d7084
10
bot.go
10
bot.go
@ -167,9 +167,12 @@ func botGetClients(m *tb.Message) {
|
||||
}
|
||||
if _, ok := clientsKeepAlive.Load(m.Chat.ID); ok {
|
||||
var ret string
|
||||
clientsCW.Range(func(k, v interface{}) bool {
|
||||
c := v.(*ChatWarsClient)
|
||||
ret = fmt.Sprintf("%s%s | UserID : %d | TelegramID : %d\n", ret, c.UserID64, c.TelegramID64)
|
||||
clientsKeepAlive.Range(func(k, v interface{}) bool {
|
||||
ka := v.(*MQKeepAlive)
|
||||
if v2, ok2 := clientsCW.Load(ka.UserID64); ok2 {
|
||||
clt := v2.(*ChatWarsClient)
|
||||
ret = fmt.Sprintf("%s%s | UserID : %d | TelegramID : %d\n", ret, ka.Nickname, clt.UserID64, ka.UserID64)
|
||||
}
|
||||
return true
|
||||
})
|
||||
c := TGCommand{
|
||||
@ -177,6 +180,7 @@ func botGetClients(m *tb.Message) {
|
||||
Text: ret,
|
||||
FromMsgID64: int64(m.ID),
|
||||
FromChatID64: m.Chat.ID,
|
||||
ParseMode: cmdParseModeHTML,
|
||||
}
|
||||
TGCmdQueue <- c
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user