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 {
|
if _, ok := clientsKeepAlive.Load(m.Chat.ID); ok {
|
||||||
var ret string
|
var ret string
|
||||||
clientsCW.Range(func(k, v interface{}) bool {
|
clientsKeepAlive.Range(func(k, v interface{}) bool {
|
||||||
c := v.(*ChatWarsClient)
|
ka := v.(*MQKeepAlive)
|
||||||
ret = fmt.Sprintf("%s%s | UserID : %d | TelegramID : %d\n", ret, c.UserID64, c.TelegramID64)
|
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
|
return true
|
||||||
})
|
})
|
||||||
c := TGCommand{
|
c := TGCommand{
|
||||||
@ -177,6 +180,7 @@ func botGetClients(m *tb.Message) {
|
|||||||
Text: ret,
|
Text: ret,
|
||||||
FromMsgID64: int64(m.ID),
|
FromMsgID64: int64(m.ID),
|
||||||
FromChatID64: m.Chat.ID,
|
FromChatID64: m.Chat.ID,
|
||||||
|
ParseMode: cmdParseModeHTML,
|
||||||
}
|
}
|
||||||
TGCmdQueue <- c
|
TGCmdQueue <- c
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user