test
This commit is contained in:
parent
fb86db548e
commit
8b3f670b5a
8
bot.go
8
bot.go
@ -22,6 +22,7 @@ func BotHandlers(b *tb.Bot) {
|
||||
|
||||
func botPause(m *tb.Message) {
|
||||
forcePaused = true
|
||||
if !paused {
|
||||
paused = true
|
||||
px := PacketAdminRCon{
|
||||
Packet: Packet{PType: AdminPacketAdminRCon},
|
||||
@ -29,6 +30,10 @@ func botPause(m *tb.Message) {
|
||||
}
|
||||
_, err := conn.Write(px.Bytes())
|
||||
logErrorDebug(err, "botPause : conn.Write")
|
||||
sendChat(-436055948, "Game paused.")
|
||||
} else {
|
||||
sendChat(-436055948, "Game already paused.")
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@ -42,6 +47,9 @@ func botUnpause(m *tb.Message) {
|
||||
}
|
||||
_, err := conn.Write(px.Bytes())
|
||||
logErrorDebug(err, "botUnpause : conn.Write")
|
||||
sendChat(-436055948, "Game unpaused.")
|
||||
} else {
|
||||
sendChat(-436055948, "Game already unpaused.")
|
||||
}
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user