Documentation ¶
Index ¶
Constants ¶
View Source
const (
DiscordApiURL = "https://discord.com/api"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BotClient ¶
func (*BotClient) GetGuildClient ¶
func (botClient *BotClient) GetGuildClient(guildId discord.Snowflake) *GuildClient
func (*BotClient) MakeRequest ¶
func (botClient *BotClient) MakeRequest(discordRequest DiscordRequest) (response *http.Response, err error)
type DiscordRequest ¶
type DiscordRequest struct { ExpectedStatus int Method string Endpoint string Body []byte UnmarshalTo interface{} DisableAuth bool DisableStatusCheck bool AdditionalHeaders map[string]string }
func (*DiscordRequest) GetUrl ¶
func (discordRequest *DiscordRequest) GetUrl() string
func (*DiscordRequest) ValidateEndpoint ¶
func (discordRequest *DiscordRequest) ValidateEndpoint()
type GuildClient ¶
func (*GuildClient) GetMemberClient ¶
func (guildClient *GuildClient) GetMemberClient(memberId discord.Snowflake) *MemberClient
func (*GuildClient) MakeRequest ¶
func (guildClient *GuildClient) MakeRequest(discordRequest DiscordRequest) (response *http.Response, err error)
type MemberClient ¶
type MemberClient struct { MemberId discord.Snowflake GuildClient *GuildClient }
func (*MemberClient) AddRoleToMember ¶
func (memberClient *MemberClient) AddRoleToMember(opts ModifyMemberRoleOpts) error
func (*MemberClient) FetchMember ¶
func (memberClient *MemberClient) FetchMember() (*discord.Member, error)
func (*MemberClient) MakeRequest ¶
func (memberClient *MemberClient) MakeRequest(discordRequest DiscordRequest) (response *http.Response, err error)
type ModifyMemberRoleOpts ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.