discord

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 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

func ExtractChannelIDFromText(mention string) (string, error)

func ExtractRoleIDFromText

func ExtractRoleIDFromText(mention string) (string, error)

func ExtractUserIDFromText

func ExtractUserIDFromText(mention string) (string, error)

func MentionByChannelID

func MentionByChannelID(channelID string) string

func MentionByUserID

func MentionByUserID(userID string) string

func ValidateSnowflake

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