Documentation
¶
Index ¶
Constants ¶
View Source
const KVSChannelName = "discordkvs_donotremove"
Variables ¶
View Source
var ErrEmptyKey = errors.New("empty keys are not permitted")
View Source
var ErrNoExist = errors.New("pair does not exist")
Functions ¶
func AcceptDataFromOtherUsers ¶
func AcceptDataFromOtherUsers(a *Application)
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
func NewApplication ¶
func NewApplication(s *discordgo.Session, id string, opts ...ApplicationConfigOption) (*Application, error)
func (*Application) Del ¶ added in v1.1.0
func (a *Application) Del(guildID string, key string) error
Del deletes a key-value pair.
func (*Application) Get ¶
func (a *Application) Get(guildID string, key string) ([]byte, error)
Get gets the corresponding value given a key.
func (*Application) GetKVSChannelID ¶ added in v1.1.0
func (a *Application) GetKVSChannelID(guildID string) (string, error)
Gets the KVS channel for guild, creating one if it doesn't already exist.
type ApplicationConfigOption ¶
type ApplicationConfigOption func(*Application)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.