discord

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const DiscordEpoch = 1420070400000
View Source
const IDLength = 10

Variables

This section is empty.

Functions

func ApplyMuteDeaf

func ApplyMuteDeaf(sess *discordgo.Session, guildID, userID string, mute, deaf bool) error

func ExtractChannelIDFromText added in v0.1.0

func ExtractChannelIDFromText(mention string) (string, error)

func ExtractRoleIDFromText added in v0.0.23

func ExtractRoleIDFromText(mention string) (string, error)

func ExtractUserIDFromText added in v0.1.0

func ExtractUserIDFromText(mention string) (string, error)

func MentionByChannelID added in v0.0.26

func MentionByChannelID(channelID string) string

func MentionByUserID added in v0.0.26

func MentionByUserID(userID string) string

func ValidateSnowflake added in v0.0.23

func ValidateSnowflake(snowflake string) error

Types

type ModifyTask

type ModifyTask struct {
	GuildID    uint64      `json:"guildID"`
	UserID     uint64      `json:"userID"`
	Parameters PatchParams `json:"parameters"`
	TaskID     string      `json:"taskID"`
}

func NewModifyTask

func NewModifyTask(guildID, userID uint64, params PatchParams) ModifyTask

type MuteDeafenSuccessCounts

type MuteDeafenSuccessCounts struct {
	Worker    int64 `json:"worker"`
	Capture   int64 `json:"capture"`
	Official  int64 `json:"official"`
	RateLimit int64 `json:"ratelimit"`
}

a response indicating how the mutes/deafens were issued, and if ratelimits occurred

type PatchParams

type PatchParams struct {
	Deaf bool `json:"deaf"`
	Mute bool `json:"mute"`
}

type UserModify

type UserModify struct {
	UserID uint64 `json:"userID"`
	Mute   bool   `json:"mute"`
	Deaf   bool   `json:"deaf"`
}

type UserModifyRequest

type UserModifyRequest struct {
	Premium premium.Tier `json:"premium"`
	Users   []UserModify `json:"users"`
}

Jump to

Keyboard shortcuts

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