internal

package
v0.17.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssetService added in v0.0.14

type AssetService struct {
	*BaseService
}

func (*AssetService) Create added in v0.0.14

func (s *AssetService) Create(ctx context.Context, file []byte) (*model.AssetCreateResp, error)

type BadgeService added in v0.0.14

type BadgeService struct {
	*BaseService
}

BadgeService

func (*BadgeService) List added in v0.0.14

func (s *BadgeService) List(ctx context.Context, guildId string) (*model.BadgeListResp, error)

type BaseService

type BaseService struct {
	// contains filtered or unexported fields
}

BaseService 基础服务结构

func NewBaseService

func NewBaseService(client http.Client) *BaseService

NewBaseService 创建基础服务

type BlacklistService added in v0.0.14

type BlacklistService struct {
	*BaseService
}

BlacklistService

func (*BlacklistService) List added in v0.0.14

type ChannelService

type ChannelService struct {
	*BaseService
}

func (*ChannelService) Create added in v0.0.14

func (*ChannelService) Delete added in v0.0.14

func (c *ChannelService) Delete(ctx context.Context, channelId string) error

func (*ChannelService) GetJoinedChannel added in v0.0.14

func (c *ChannelService) GetJoinedChannel(ctx context.Context, guildId, userId string, page, pageSize int) (*model.ChannelListResp, error)

func (*ChannelService) Kickout added in v0.0.14

func (c *ChannelService) Kickout(ctx context.Context, channelId string, userIds ...string) error

func (*ChannelService) List added in v0.0.14

func (c *ChannelService) List(ctx context.Context, guildId string, page, pageSize int, channelType int) (*model.ChannelListResp, error)

func (*ChannelService) MoveUser added in v0.0.14

func (c *ChannelService) MoveUser(ctx context.Context, channelId string, userIds ...string) error

func (*ChannelService) Update added in v0.0.14

func (*ChannelService) UserList added in v0.0.14

func (c *ChannelService) UserList(ctx context.Context, channelId string) (*model.ChannelUserListResp, error)

func (*ChannelService) View

func (c *ChannelService) View(ctx context.Context, targetId string, needChildren bool) (*model.ViewChannelResp, error)

type CreateThreadReq added in v0.0.14

type CreateThreadReq struct {
	ChannelId string `json:"target_id"`
	Content   string `json:"content"`
	Title     string `json:"title,omitempty"` // 帖子通常有标题
	Type      int    `json:"type,omitempty"`
}

type CreateThreadResp added in v0.0.14

type CreateThreadResp struct {
	MsgId        string `json:"msg_id"`
	MsgTimestamp int64  `json:"msg_timestamp"`
	Nonce        string `json:"nonce"`
}

type DirectMessageService added in v0.0.14

type DirectMessageService struct {
	*BaseService
}

func (*DirectMessageService) AddReaction added in v0.0.14

func (s *DirectMessageService) AddReaction(ctx context.Context, msgId, emoji string) error

func (*DirectMessageService) Create added in v0.0.14

func (*DirectMessageService) Delete added in v0.0.14

func (s *DirectMessageService) Delete(ctx context.Context, msgId string) error

func (*DirectMessageService) DeleteReaction added in v0.0.14

func (s *DirectMessageService) DeleteReaction(ctx context.Context, msgId, emoji string) error

func (*DirectMessageService) List added in v0.0.14

func (s *DirectMessageService) List(ctx context.Context, chatCode, targetId string) (*model.DirectMessageListResp, error)

func (*DirectMessageService) Update added in v0.0.14

func (*DirectMessageService) View added in v0.0.14

func (s *DirectMessageService) View(ctx context.Context, msgId, chatCode string) (*model.DirectMessage, error)

type EmojiService added in v0.0.14

type EmojiService struct {
	*BaseService
}

EmojiService

func (*EmojiService) List added in v0.0.14

func (s *EmojiService) List(ctx context.Context, guildId string) (*model.GuildEmojiListResp, error)

type GameService added in v0.0.14

type GameService struct {
	*BaseService
}

GameService

func (*GameService) UpdateActivity added in v0.0.14

func (s *GameService) UpdateActivity(ctx context.Context, req model.GameActivityReq) error

type GuildService added in v0.0.14

type GuildService struct {
	*BaseService
}

func (*GuildService) Kickout added in v0.0.14

func (s *GuildService) Kickout(ctx context.Context, guildId, targetId string) error

func (*GuildService) Leave added in v0.0.14

func (s *GuildService) Leave(ctx context.Context, guildId string) error

func (*GuildService) List added in v0.0.14

func (s *GuildService) List(ctx context.Context, page, pageSize int, sort string) (*model.GuildListResp, error)

func (*GuildService) UserList added in v0.0.14

func (s *GuildService) UserList(ctx context.Context, guildId string, page, pageSize int) (*model.GuildUserListResp, error)

func (*GuildService) View added in v0.0.14

func (s *GuildService) View(ctx context.Context, guildId string) (*model.Guild, error)

type IntimacyService added in v0.0.14

type IntimacyService struct {
	*BaseService
}

IntimacyService

func (*IntimacyService) Update added in v0.0.14

type InviteService added in v0.0.14

type InviteService struct {
	*BaseService
}

InviteService

func (*InviteService) List added in v0.0.14

func (s *InviteService) List(ctx context.Context, guildId, channelId string) (*model.InviteListResp, error)

type MessageService added in v0.0.13

type MessageService struct {
	*BaseService
}

func (*MessageService) AddReaction added in v0.0.14

func (s *MessageService) AddReaction(ctx context.Context, msgId, emoji string) error

func (*MessageService) Create added in v0.0.13

func (*MessageService) Delete added in v0.0.14

func (s *MessageService) Delete(ctx context.Context, msgId string) error

func (*MessageService) DeleteReaction added in v0.0.14

func (s *MessageService) DeleteReaction(ctx context.Context, msgId, emoji, userId string) error

func (*MessageService) List added in v0.0.14

func (s *MessageService) List(ctx context.Context, targetId string) (*model.MessageListResp, error)

func (*MessageService) Update added in v0.0.14

func (*MessageService) View added in v0.0.14

func (s *MessageService) View(ctx context.Context, msgId string) (*model.Message, error)

type RoleService added in v0.0.14

type RoleService struct {
	*BaseService
}

func (*RoleService) Create added in v0.0.14

func (*RoleService) Delete added in v0.0.14

func (s *RoleService) Delete(ctx context.Context, guildId string, roleId int) error

func (*RoleService) Grant added in v0.0.14

func (s *RoleService) Grant(ctx context.Context, guildId, userId string, roleId int) error

func (*RoleService) List added in v0.0.14

func (s *RoleService) List(ctx context.Context, guildId string) (*model.GuildRoleListResp, error)

func (*RoleService) Revoke added in v0.0.14

func (s *RoleService) Revoke(ctx context.Context, guildId, userId string, roleId int) error

func (*RoleService) Update added in v0.0.14

type ThreadService added in v0.0.14

type ThreadService struct {
	*BaseService
}

func (*ThreadService) Create added in v0.0.14

type UserService added in v0.0.14

type UserService struct {
	*BaseService
}

func (*UserService) Me added in v0.0.14

func (*UserService) Offline added in v0.0.14

func (s *UserService) Offline(ctx context.Context) error

func (*UserService) View added in v0.0.14

func (s *UserService) View(ctx context.Context, userId string, guildId string) (*model.UserViewResp, error)

type VoiceService added in v0.0.14

type VoiceService struct {
	*BaseService
}

func (*VoiceService) Join added in v0.0.14

func (s *VoiceService) Join(ctx context.Context, channelId, password string) (*model.JoinVoiceResp, error)

func (*VoiceService) KeepAlive added in v0.0.14

func (s *VoiceService) KeepAlive(ctx context.Context, channelId string) error

func (*VoiceService) Leave added in v0.0.14

func (s *VoiceService) Leave(ctx context.Context, channelId string) error

func (*VoiceService) List added in v0.0.14

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址