discorddata

package
v2.49.2 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: MIT Imports: 13 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EvictSession

func EvictSession(token string)

func GetFullGuild

func GetFullGuild(guildID int64) (*dstate.GuildSet, error)

GetFullGuild returns the guild from either: 1. Application cache 2. Botrest 3. Discord api

It will will also make sure channels are included in the event we fall back to the discord API

func GetMember

func GetMember(guildID, userID int64) (*discordgo.Member, error)

func GetSession

func GetSession(token string, sessionFetcher func(string) (*oauth2.Token, error)) (*discordgo.Session, error)

func GetUserInfo

func GetUserInfo(token string, session *discordgo.Session) (*discordgo.User, error)

func PubEvictGuild

func PubEvictGuild(guildID int64)

func PubEvictMember

func PubEvictMember(guildID int64, userID int64)

func RegisterPlugin

func RegisterPlugin()

Types

type EvictData

type EvictData struct {
	Keys []string `json:"keys"`
}

type Plugin

type Plugin struct{}

func (*Plugin) BotInit

func (p *Plugin) BotInit()

func (*Plugin) PluginInfo

func (p *Plugin) PluginInfo() *common.PluginInfo

Jump to

Keyboard shortcuts

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