Documentation ¶
Index ¶
- Constants
- type ChannelMessagesQuery
- func (v ChannelMessagesQuery) After(ctx context.Context, id snowflake.ID, limit uint16) (msgs []discord.Message, err error)
- func (v ChannelMessagesQuery) Around(id snowflake.ID, limit uint16) (msgs []discord.Message, err error)
- func (v ChannelMessagesQuery) Before(ctx context.Context, id snowflake.ID, limit uint16) (msgs []discord.Message, err error)
- func (v ChannelMessagesQuery) ID() snowflake.ID
- func (v ChannelMessagesQuery) Latest(limit uint16) (msgs []discord.Message, err error)
- type ChannelQuery
- func (c ChannelQuery) AddMember(id snowflake.ID) error
- func (c ChannelQuery) Bulk(ids []snowflake.ID) error
- func (c ChannelQuery) CreateWebhook(opts discord.WebhookCreate) (res *discord.Webhook, err error)
- func (c ChannelQuery) Delete() error
- func (c ChannelQuery) Edit() discord.UpdateChannelTypeSelector
- func (c ChannelQuery) Follow(target snowflake.ID) error
- func (c ChannelQuery) Get() (ch *discord.Channel, err error)
- func (c ChannelQuery) GetThreadMember(id snowflake.ID) (tm *discord.ThreadMember, err error)
- func (c ChannelQuery) ID() snowflake.ID
- func (c ChannelQuery) Invites() (invites []discord.InviteWithMeta, err error)
- func (c ChannelQuery) Join() error
- func (c ChannelQuery) Leave() error
- func (c ChannelQuery) Message(id snowflake.ID) discord.MessageQuery
- func (c ChannelQuery) Messages() discord.ChannelMessagesQuery
- func (e *ChannelQuery) NoAPI() V
- func (e *ChannelQuery) NoCache() V
- func (c ChannelQuery) Pinned() (msg []discord.Message, err error)
- func (e *ChannelQuery) Reason(str string) V
- func (c ChannelQuery) RemoveMember(id snowflake.ID) error
- func (c ChannelQuery) SendMessage() discord.CreateMessageBuilder
- func (c ChannelQuery) Stage() discord.StageQuery
- func (c ChannelQuery) StartForumThread(name string) discord.CreateForumMessageBuilder
- func (c ChannelQuery) StartThread(name string) discord.CreateThreadTypeSelector
- func (c ChannelQuery) Webhooks() (res []discord.Webhook, err error)
- type Client
- func (v *Client) Channel(id snowflake.ID) discord.ChannelQuery
- func (v *Client) CurrentUser() (user *discord.User, err error)
- func (v *Client) Do(req *fasthttp.Request, options ...Option) (*fasthttp.Response, error)
- func (v *Client) DoBytes(req *fasthttp.Request, options ...Option) ([]byte, error)
- func (v *Client) DoNoResp(req *fasthttp.Request, options ...Option) error
- func (v *Client) DoResult(req *fasthttp.Request, result any, options ...Option) error
- func (v *Client) GatewayURL() (url string, err error)
- func (v *Client) Guild(id snowflake.ID) discord.GuildQuery
- func (v *Client) Log() golog.Logger
- func (v *Client) LowLevel() discord.LowLevelClientQuery
- func (v *Client) New(auth bool) *fasthttp.Request
- func (v *Client) SessionData() (data SessionInfo, err error)
- func (v *Client) User(id snowflake.ID) discord.UserQuery
- func (v *Client) Webhook(id snowflake.ID, token string) discord.WebhookQuery
- type GuildQuery
- func (v GuildQuery) ActiveThreads() (threads []discord.Channel, err error)
- func (v GuildQuery) Channels() (channels []discord.Channel, err error)
- func (v GuildQuery) CreateChannel(name string) discord.GuildChannelBuilder
- func (v GuildQuery) CreateRole() discord.RoleBuilder
- func (v GuildQuery) Delete() error
- func (v GuildQuery) Edit() discord.GuildBuilder
- func (v GuildQuery) Get() (guild *discord.Guild, err error)
- func (v GuildQuery) ID() snowflake.ID
- func (v GuildQuery) Invites() (invites []discord.InviteWithMeta, err error)
- func (v GuildQuery) Member(id snowflake.ID) discord.GuildMemberQuery
- func (v GuildQuery) Members(limit int, after snowflake.ID) (members []discord.MemberWithUser, err error)
- func (e *GuildQuery) NoAPI() V
- func (e *GuildQuery) NoCache() V
- func (e *GuildQuery) Reason(str string) V
- func (v GuildQuery) Role(id snowflake.ID) discord.RoleQuery
- func (v GuildQuery) Roles() (roles []discord.Role, err error)
- func (v GuildQuery) Search(query string, limit uint16) (members []discord.MemberWithUser, err error)
- func (v GuildQuery) SetCurrentNick(nick string) (err error)
- func (v GuildQuery) UpdateChannelPositions(positions *discord.GuildChannelPositionsBuilder) error
- func (v GuildQuery) UpdateRolePositions(roles discord.RolePositions) error
- func (v GuildQuery) VoiceStates() (states discord.Slice[discord.VoiceState], err error)
- type MemberQuery
- func (v MemberQuery) AddRole(role snowflake.ID) (err error)
- func (v MemberQuery) Ban(days uint8) (err error)
- func (v MemberQuery) Edit() discord.UpdateGuildMemberBuilder
- func (v MemberQuery) Get() (member *discord.MemberWithUser, err error)
- func (v MemberQuery) GuildID() snowflake.ID
- func (v MemberQuery) ID() snowflake.ID
- func (v MemberQuery) Kick() (err error)
- func (e *MemberQuery) NoAPI() V
- func (e *MemberQuery) NoCache() V
- func (v MemberQuery) Permissions() (perm permissions.Permission, err error)
- func (v MemberQuery) PermissionsIn(channel snowflake.ID) (perm permissions.Permission, err error)
- func (e *MemberQuery) Reason(str string) V
- func (v MemberQuery) RemoveRole(role snowflake.ID) (err error)
- func (v MemberQuery) Unban() (err error)
- func (v MemberQuery) VoiceState() (state *discord.VoiceState, err error)
- type MessageQuery
- func (m MessageQuery) ChannelID() snowflake.ID
- func (m MessageQuery) CrossPost() error
- func (m MessageQuery) Delete() (err error)
- func (m MessageQuery) Edit() discord.MessageBuilder
- func (m MessageQuery) Get() (msg *discord.Message, err error)
- func (m MessageQuery) ID() snowflake.ID
- func (e *MessageQuery) NoAPI() V
- func (e *MessageQuery) NoCache() V
- func (m MessageQuery) Pin() error
- func (m MessageQuery) React(emoji string) error
- func (m MessageQuery) Reaction(emoji string) discord.MessageReactionQuery
- func (e *MessageQuery) Reason(str string) V
- func (m MessageQuery) RemoveAllReactions() (err error)
- func (m MessageQuery) StartThread(name string) discord.CreateThreadChannelBuilder
- func (m MessageQuery) UnPin() error
- type Option
- type ReactionQuery
- func (r ReactionQuery) After(limit uint64, after snowflake.ID) (users []discord.User, err error)
- func (r ReactionQuery) All(limit uint64) (users []discord.User, err error)
- func (r ReactionQuery) Channel() snowflake.ID
- func (r ReactionQuery) Emoji() string
- func (r ReactionQuery) Message() snowflake.ID
- func (e *ReactionQuery) NoAPI() V
- func (e *ReactionQuery) NoCache() V
- func (r ReactionQuery) Range(limit uint64, after snowflake.ID) (users []discord.User, err error)
- func (e *ReactionQuery) Reason(str string) V
- func (r ReactionQuery) Remove(userID snowflake.ID) (err error)
- func (r ReactionQuery) RemoveAll() (err error)
- func (r ReactionQuery) RemoveOwn() (err error)
- type RequestData
- type RoleQuery
- type SessionInfo
- type StageQuery
- func (s StageQuery) Create(topic string, notify bool) (stage *discord.StageInstance, err error)
- func (s StageQuery) Delete() error
- func (s StageQuery) Get() (stage *discord.StageInstance, err error)
- func (s StageQuery) Modify(topic string) (stage *discord.StageInstance, err error)
- func (e *StageQuery) NoAPI() V
- func (e *StageQuery) NoCache() V
- func (e *StageQuery) Reason(str string) V
- type UserQuery
- func (u UserQuery) CreateDM() (channel *discord.Channel, err error)
- func (u UserQuery) Get() (user *discord.User, err error)
- func (u UserQuery) ID() snowflake.ID
- func (e *UserQuery) NoAPI() V
- func (e *UserQuery) NoCache() V
- func (e *UserQuery) Reason(str string) V
- func (u UserQuery) Send() (bld discord.CreateMessageBuilder, err error)
Constants ¶
View Source
const ( ApiUrl = "https://discord.com/api" ApiVersion = "v10" FullApiUrl = ApiUrl + "/" + ApiVersion )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChannelMessagesQuery ¶
type ChannelMessagesQuery struct {
// contains filtered or unexported fields
}
func NewChannelMessagesQuery ¶
func NewChannelMessagesQuery(client *Client, channel snowflake.ID) ChannelMessagesQuery
func (ChannelMessagesQuery) Around ¶
func (v ChannelMessagesQuery) Around(id snowflake.ID, limit uint16) (msgs []discord.Message, err error)
func (ChannelMessagesQuery) ID ¶
func (v ChannelMessagesQuery) ID() snowflake.ID
type ChannelQuery ¶
type ChannelQuery struct {
// contains filtered or unexported fields
}
func NewChannelQuery ¶
func NewChannelQuery(client *Client, id snowflake.ID) *ChannelQuery
func (ChannelQuery) AddMember ¶
func (c ChannelQuery) AddMember(id snowflake.ID) error
func (ChannelQuery) Bulk ¶
func (c ChannelQuery) Bulk(ids []snowflake.ID) error
func (ChannelQuery) CreateWebhook ¶ added in v0.1.3
func (c ChannelQuery) CreateWebhook(opts discord.WebhookCreate) (res *discord.Webhook, err error)
func (ChannelQuery) Delete ¶
func (c ChannelQuery) Delete() error
func (ChannelQuery) Edit ¶
func (c ChannelQuery) Edit() discord.UpdateChannelTypeSelector
func (ChannelQuery) Follow ¶
func (c ChannelQuery) Follow(target snowflake.ID) error
func (ChannelQuery) GetThreadMember ¶
func (c ChannelQuery) GetThreadMember(id snowflake.ID) (tm *discord.ThreadMember, err error)
func (ChannelQuery) ID ¶
func (c ChannelQuery) ID() snowflake.ID
func (ChannelQuery) Invites ¶
func (c ChannelQuery) Invites() (invites []discord.InviteWithMeta, err error)
func (ChannelQuery) Join ¶
func (c ChannelQuery) Join() error
func (ChannelQuery) Leave ¶
func (c ChannelQuery) Leave() error
func (ChannelQuery) Message ¶
func (c ChannelQuery) Message(id snowflake.ID) discord.MessageQuery
func (ChannelQuery) Messages ¶
func (c ChannelQuery) Messages() discord.ChannelMessagesQuery
func (ChannelQuery) RemoveMember ¶
func (c ChannelQuery) RemoveMember(id snowflake.ID) error
func (ChannelQuery) SendMessage ¶
func (c ChannelQuery) SendMessage() discord.CreateMessageBuilder
func (ChannelQuery) Stage ¶
func (c ChannelQuery) Stage() discord.StageQuery
func (ChannelQuery) StartForumThread ¶
func (c ChannelQuery) StartForumThread(name string) discord.CreateForumMessageBuilder
func (ChannelQuery) StartThread ¶
func (c ChannelQuery) StartThread(name string) discord.CreateThreadTypeSelector
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Channel ¶
func (v *Client) Channel(id snowflake.ID) discord.ChannelQuery
func (*Client) GatewayURL ¶
func (*Client) Guild ¶
func (v *Client) Guild(id snowflake.ID) discord.GuildQuery
func (*Client) LowLevel ¶
func (v *Client) LowLevel() discord.LowLevelClientQuery
func (*Client) SessionData ¶
func (v *Client) SessionData() (data SessionInfo, err error)
type GuildQuery ¶
type GuildQuery struct {
// contains filtered or unexported fields
}
func NewGuildQuery ¶
func NewGuildQuery(client *Client, id snowflake.ID) *GuildQuery
func (GuildQuery) ActiveThreads ¶
func (v GuildQuery) ActiveThreads() (threads []discord.Channel, err error)
func (GuildQuery) CreateChannel ¶
func (v GuildQuery) CreateChannel(name string) discord.GuildChannelBuilder
func (GuildQuery) CreateRole ¶
func (v GuildQuery) CreateRole() discord.RoleBuilder
func (GuildQuery) Delete ¶
func (v GuildQuery) Delete() error
func (GuildQuery) Edit ¶
func (v GuildQuery) Edit() discord.GuildBuilder
func (GuildQuery) ID ¶
func (v GuildQuery) ID() snowflake.ID
func (GuildQuery) Invites ¶
func (v GuildQuery) Invites() (invites []discord.InviteWithMeta, err error)
func (GuildQuery) Member ¶
func (v GuildQuery) Member(id snowflake.ID) discord.GuildMemberQuery
func (GuildQuery) Members ¶
func (v GuildQuery) Members(limit int, after snowflake.ID) (members []discord.MemberWithUser, err error)
func (GuildQuery) Role ¶
func (v GuildQuery) Role(id snowflake.ID) discord.RoleQuery
func (GuildQuery) Search ¶
func (v GuildQuery) Search(query string, limit uint16) (members []discord.MemberWithUser, err error)
func (GuildQuery) SetCurrentNick ¶
func (v GuildQuery) SetCurrentNick(nick string) (err error)
func (GuildQuery) UpdateChannelPositions ¶
func (v GuildQuery) UpdateChannelPositions(positions *discord.GuildChannelPositionsBuilder) error
func (GuildQuery) UpdateRolePositions ¶
func (v GuildQuery) UpdateRolePositions(roles discord.RolePositions) error
func (GuildQuery) VoiceStates ¶
func (v GuildQuery) VoiceStates() (states discord.Slice[discord.VoiceState], err error)
type MemberQuery ¶
type MemberQuery struct {
// contains filtered or unexported fields
}
func NewMemberQuery ¶
func NewMemberQuery(client *Client, guild snowflake.ID, id snowflake.ID) *MemberQuery
func (MemberQuery) AddRole ¶
func (v MemberQuery) AddRole(role snowflake.ID) (err error)
func (MemberQuery) Ban ¶
func (v MemberQuery) Ban(days uint8) (err error)
func (MemberQuery) Edit ¶
func (v MemberQuery) Edit() discord.UpdateGuildMemberBuilder
func (MemberQuery) Get ¶
func (v MemberQuery) Get() (member *discord.MemberWithUser, err error)
func (MemberQuery) GuildID ¶
func (v MemberQuery) GuildID() snowflake.ID
func (MemberQuery) ID ¶
func (v MemberQuery) ID() snowflake.ID
func (MemberQuery) Kick ¶
func (v MemberQuery) Kick() (err error)
func (MemberQuery) Permissions ¶
func (v MemberQuery) Permissions() (perm permissions.Permission, err error)
func (MemberQuery) PermissionsIn ¶
func (v MemberQuery) PermissionsIn(channel snowflake.ID) (perm permissions.Permission, err error)
func (MemberQuery) RemoveRole ¶
func (v MemberQuery) RemoveRole(role snowflake.ID) (err error)
func (MemberQuery) Unban ¶
func (v MemberQuery) Unban() (err error)
func (MemberQuery) VoiceState ¶
func (v MemberQuery) VoiceState() (state *discord.VoiceState, err error)
type MessageQuery ¶
type MessageQuery struct {
// contains filtered or unexported fields
}
func NewMessageQuery ¶
func NewMessageQuery(client *Client, channel, id snowflake.ID) *MessageQuery
func (MessageQuery) ChannelID ¶
func (m MessageQuery) ChannelID() snowflake.ID
func (MessageQuery) CrossPost ¶
func (m MessageQuery) CrossPost() error
func (MessageQuery) Delete ¶
func (m MessageQuery) Delete() (err error)
func (MessageQuery) Edit ¶
func (m MessageQuery) Edit() discord.MessageBuilder
func (MessageQuery) ID ¶
func (m MessageQuery) ID() snowflake.ID
func (MessageQuery) Pin ¶
func (m MessageQuery) Pin() error
func (MessageQuery) React ¶
func (m MessageQuery) React(emoji string) error
func (MessageQuery) Reaction ¶
func (m MessageQuery) Reaction(emoji string) discord.MessageReactionQuery
func (MessageQuery) RemoveAllReactions ¶
func (m MessageQuery) RemoveAllReactions() (err error)
func (MessageQuery) StartThread ¶
func (m MessageQuery) StartThread(name string) discord.CreateThreadChannelBuilder
func (MessageQuery) UnPin ¶
func (m MessageQuery) UnPin() error
type Option ¶
type Option func(v *RequestData)
func WithAuthHeaderPrefix ¶
func WithLogger ¶
func WithPrefix ¶
func WithRetries ¶
func WithRetryDelay ¶
func WithTimeout ¶
type ReactionQuery ¶
type ReactionQuery struct {
// contains filtered or unexported fields
}
func NewReactionQuery ¶
func NewReactionQuery(client *Client, channel, message snowflake.ID, emoji string) *ReactionQuery
func (ReactionQuery) After ¶
func (r ReactionQuery) After(limit uint64, after snowflake.ID) (users []discord.User, err error)
func (ReactionQuery) All ¶
func (r ReactionQuery) All(limit uint64) (users []discord.User, err error)
func (ReactionQuery) Channel ¶
func (r ReactionQuery) Channel() snowflake.ID
func (ReactionQuery) Emoji ¶
func (r ReactionQuery) Emoji() string
func (ReactionQuery) Message ¶
func (r ReactionQuery) Message() snowflake.ID
func (ReactionQuery) Range ¶
func (r ReactionQuery) Range(limit uint64, after snowflake.ID) (users []discord.User, err error)
func (ReactionQuery) Remove ¶
func (r ReactionQuery) Remove(userID snowflake.ID) (err error)
func (ReactionQuery) RemoveAll ¶
func (r ReactionQuery) RemoveAll() (err error)
func (ReactionQuery) RemoveOwn ¶
func (r ReactionQuery) RemoveOwn() (err error)
type RequestData ¶
type RequestData struct {
// contains filtered or unexported fields
}
type RoleQuery ¶
type RoleQuery struct {
// contains filtered or unexported fields
}
func NewRoleQuery ¶
func (RoleQuery) Edit ¶
func (r RoleQuery) Edit() discord.RoleBuilder
type SessionInfo ¶
type StageQuery ¶
type StageQuery struct {
// contains filtered or unexported fields
}
func NewStageQuery ¶
func NewStageQuery(client *Client, id snowflake.ID) *StageQuery
func (StageQuery) Create ¶
func (s StageQuery) Create(topic string, notify bool) (stage *discord.StageInstance, err error)
func (StageQuery) Delete ¶
func (s StageQuery) Delete() error
func (StageQuery) Get ¶
func (s StageQuery) Get() (stage *discord.StageInstance, err error)
func (StageQuery) Modify ¶
func (s StageQuery) Modify(topic string) (stage *discord.StageInstance, err error)
type UserQuery ¶
type UserQuery struct {
// contains filtered or unexported fields
}
func NewUserQuery ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.