mirror of
https://github.com/fumiama/NanoBot.git
synced 2026-06-06 03:00:24 +08:00
finish base
This commit is contained in:
28
openapi_guild.go
Normal file
28
openapi_guild.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package nano
|
||||
|
||||
import "time"
|
||||
|
||||
// Guild 频道对象
|
||||
//
|
||||
// https://bot.q.qq.com/wiki/develop/api/openapi/guild/model.html
|
||||
type Guild struct {
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Icon string `json:"icon"`
|
||||
OwnerID string `json:"owner_id"`
|
||||
Owner bool `json:"owner"`
|
||||
JoinedAt time.Time `json:"joined_at"`
|
||||
MemberCount int `json:"member_count"`
|
||||
MaxMembers int `json:"max_members"`
|
||||
Description string `json:"description"`
|
||||
}
|
||||
|
||||
// GuildArray []Guild 的别名
|
||||
type GuildArray []Guild
|
||||
|
||||
// GetGuildByID 获取 id 指定的频道的详情
|
||||
//
|
||||
// https://bot.q.qq.com/wiki/develop/api/openapi/guild/get_guild.html
|
||||
func (bot *Bot) GetGuildByID(id string) (*Guild, error) {
|
||||
return bot.getOpenAPIofGuild("/guilds/" + id)
|
||||
}
|
||||
Reference in New Issue
Block a user