slash

package module
v0.0.0-...-6c99959 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PUBLIC_KEY, _ = hex.DecodeString((os.Getenv("PUBLIC_KEY")))

Functions

func HandleInteraction

func HandleInteraction(w http.ResponseWriter, r *http.Request)

Types

type GuildMember

type GuildMember struct {
	User User `json:"user"`
}

type Interaction

type Interaction struct {
	ID        string          `json:"id"`
	Type      int             `json:"type"`
	Data      InteractionData `json:"data"`
	GuildID   string          `json:"guild_id"`
	ChannelID string          `json:"channel_id"`
	Member    GuildMember     `json:"member"`
	User      User            `json:"user"`
	Token     string          `json:"token"`
	Version   int             `json:"version"`
}

type InteractionCommandCallbackData

type InteractionCommandCallbackData struct {
	Content string `json:"content"`
}

type InteractionData

type InteractionData struct {
	ID      string                  `json:"id"`
	Name    string                  `json:"name"`
	Options []InteractionDataOption `json:"options"`
}

type InteractionDataOption

type InteractionDataOption struct {
	Name    string                  `json:"name"`
	Value   string                  `json:"value"`
	Options []InteractionDataOption `json:"options"`
}

type InteractionResponse

type InteractionResponse struct {
	Type int                            `json:"type"`
	Data InteractionCommandCallbackData `json:"data"`
}

type InteractionResponseType

type InteractionResponseType struct {
	Pong                             int
	ChannelMessageWithSource         int
	DeferredChannelMessageWithSource int
}

type NoUIDError

type NoUIDError struct{}

func (*NoUIDError) Error

func (e *NoUIDError) Error() string

type QueryDocError

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

func (*QueryDocError) Error

func (e *QueryDocError) Error() string

type User

type User struct {
	ID       string `json:"id"`
	Username string `json:"username"`
	Bot      bool   `json:"bot"`
}

Jump to

Keyboard shortcuts

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