1
0
mirror of https://github.com/fumiama/NanoBot.git synced 2026-06-09 04:30:24 +08:00
This commit is contained in:
源文雨
2023-10-16 00:26:04 +09:00
parent 6a1019d201
commit ce34c996ef
25 changed files with 2844 additions and 8 deletions

5
bot.go
View File

@@ -143,6 +143,11 @@ func (bot *Bot) Authorization() string {
return "Bot " + bot.AppID + "." + bot.Token
}
// AtMe 返回 "<@!"+bot.ready.User.ID+">"
func (bot *Bot) AtMe() string {
return "<@!" + bot.ready.User.ID + ">"
}
// receive 收一个 payload
func (bot *Bot) reveive() (payload WebsocketPayload, err error) {
err = bot.conn.ReadJSON(&payload)