cache

package
v0.0.0-...-4a4c199 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2021 License: Apache-2.0 Imports: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteGuildMusicState

func DeleteGuildMusicState(guildId disgord.Snowflake)

func GetUserVoiceState

func GetUserVoiceState(userId disgord.Snowflake) *disgord.VoiceState

func VoiceStateUpdate

func VoiceStateUpdate(session disgord.Session, event *disgord.VoiceStateUpdate)

Types

type GuildSettings

type GuildSettings struct {
	Id            disgord.Snowflake
	CommandPrefix string

	EarnExperience    bool
	EarnFromMessage   int
	EarnFromVoiceTime int
	EarnFromMeme      int

	TrustLevels           bool
	MinimumTrustLevel     int
	MaximumTrustLevel     int
	TrustRoles            map[int]disgord.Role
	TrustExp              map[int]int
	TrustNextLevelMessage string
	TrustNextLevelImage   string

	AutoChannels      bool
	AutoChannelsList  []disgord.Snowflake
	AutoChannelName   string
	AutoChannelDelete int

	ModLogChannel     disgord.Snowflake
	WelcomeChannel    disgord.Snowflake
	CleverBotChannels []disgord.Snowflake
	MemesChannels     []disgord.Snowflake

	WelcomeMessage    string
	WelcomeImage      string
	WelcomeEmbedStats bool

	QuitMessage    string
	QuitImage      string
	QuitEmbedStats bool

	ReactRoles    bool
	ReactMessages map[disgord.Snowflake]ReactMessage

	SaveRoles          bool
	ChatLogs           bool
	AntiMention        bool
	MutedRole          disgord.Role
	TrackDeletes       bool
	TrackModifications bool
	AdminRole          disgord.Role

	MuteWarningsAt int
	KickWarningsAt int
	BanWarningsAt  int

	VoiceBot          bool
	VoiceDjRole       disgord.Role
	VoiceMaxQueue     int
	VoiceLoopTrack    bool
	VoiceLoopPlaylist bool
	VoiceTimeout      int
}

func CreateOrGetGuildSettings

func CreateOrGetGuildSettings(guild *disgord.Guild) *GuildSettings

func GetGuildSettings

func GetGuildSettings(guildId disgord.Snowflake) *GuildSettings

type MusicBotState

type MusicBotState struct {
	GuildId        disgord.Snowflake
	VoiceChannelId disgord.Snowflake
	Voice          disgord.VoiceConnection
	Tracks         map[int]*MusicBotTrack
	LoopTrack      bool
	LoopPlayList   bool
	Paused         bool
	Running        bool
	LastPlay       time.Time
}

func GetVoiceState

func GetVoiceState(guildId disgord.Snowflake) *MusicBotState

func GetVoiceStates

func GetVoiceStates() []*MusicBotState

func PutGuildMusicState

func PutGuildMusicState(guildId disgord.Snowflake, state *MusicBotState) *MusicBotState

type MusicBotTrack

type MusicBotTrack struct {
	MusicBytes     *[]byte
	ReadCloser     io.ReadCloser
	BitRate        int
	URL            string
	Name           string
	Playback       *time.Duration
	Duration       time.Duration
	RawSavedFrames []RawSavedFrame
	ReaderRead     bool
}

type RawSavedFrame

type RawSavedFrame struct {
	Payload  []byte
	Duration time.Duration
}

type ReactMessage

type ReactMessage struct {
	ChannelID     disgord.Snowflake
	ReactionRoles map[string]disgord.Role
}

Jump to

Keyboard shortcuts

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