api

package
v0.0.0-...-e4f0057 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EmbedFolder

func EmbedFolder(fsEmbed *embed.FS, targetPath string) static.ServeFileSystem

Types

type Api

type Api struct {
	// contains filtered or unexported fields
}

func NewApi

func NewApi(servers map[string]*manager.Server, address, owner string, clients *manager.Clients, buildFS *embed.FS, origin string) *Api

func (*Api) AddLongLivedToken

func (a *Api) AddLongLivedToken(user *discordgo.User, userInfo UserInfo)

func (*Api) AddUser

func (a *Api) AddUser(user *discordgo.User, userInfo UserInfo) string

AddUser adds a user to the api, returning the token. If the user is already in the api, it removes it and generates a new one.

func (*Api) HandleNotifications

func (a *Api) HandleNotifications()

type UserInfo

type UserInfo struct {
	LongLivedToken string
	Guild          string
	TextChannel    string
	// contains filtered or unexported fields
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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