Documentation ¶
Index ¶
- Constants
- type Argument
- type Bot
- func (bot *Bot) AddCommandHandler(command Command, handler CommandHandler)
- func (bot *Bot) AddGlobalCommand(command *Command) error
- func (bot *Bot) DeleteGlobalCommand(command *Command) error
- func (bot *Bot) DeleteMessage(message *Message) error
- func (bot *Bot) GetChannelMessages(channel *Channel) ([]Message, error)
- func (bot *Bot) GetChannels(serverId string) ([]Channel, error)
- func (bot *Bot) GetGlobalCommands() ([]Command, error)
- func (bot *Bot) HandleEvents() error
- func (bot *Bot) SendMessage(channel *Channel, content string) error
- func (bot *Bot) SetMessageDeleteHanler(handler MessageDeleteHandler)
- func (bot *Bot) SetMessageHandler(handler MessageHandler)
- type Channel
- type Command
- type CommandHandler
- type Member
- type Message
- type MessageDeleteHandler
- type MessageHandler
- type User
- type WSArgument
- type WSInteraction
- type WSResponse
Constants ¶
View Source
const API string = "https://discord.com/api/v9"
View Source
const ARG_BOOLEAN uint8 = 5
View Source
const ARG_CHANNEL uint8 = 7
View Source
const ARG_INTEGER uint8 = 4
View Source
const ARG_STRING uint8 = 3
View Source
const ARG_SUBCOMMAND uint8 = 1
View Source
const ARG_SUBCOMMAND_GROUP uint8 = 2
View Source
const ARG_USER uint8 = 6
View Source
const CHANNEL_TEXT uint8 = 0
View Source
const CHANNEL_TEXT_CATEGORY uint8 = 4
View Source
const CHANNEL_VOICE uint8 = 2
View Source
const CHAT_INPUT uint8 = 1
View Source
const WS_API string = "wss://gateway.discord.gg"
View Source
const WS_DISPATCH uint8 = 0
View Source
const WS_HEARTBEAT uint8 = 1
View Source
const WS_INDENTIFY uint8 = 2
View Source
const WS_STATUS_UPDATE uint8 = 3
View Source
const WS_VOICE_STATE_UPDATE uint8 = 4
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bot ¶
func (*Bot) AddCommandHandler ¶
func (bot *Bot) AddCommandHandler(command Command, handler CommandHandler)
func (*Bot) AddGlobalCommand ¶
func (*Bot) DeleteGlobalCommand ¶
func (*Bot) DeleteMessage ¶
func (*Bot) GetChannelMessages ¶
func (*Bot) GetGlobalCommands ¶
func (*Bot) HandleEvents ¶
func (*Bot) SetMessageDeleteHanler ¶
func (bot *Bot) SetMessageDeleteHanler(handler MessageDeleteHandler)
func (*Bot) SetMessageHandler ¶
func (bot *Bot) SetMessageHandler(handler MessageHandler)
type CommandHandler ¶
type CommandHandler = func(*Bot, *User, string, []WSArgument) string
type MessageDeleteHandler ¶
type MessageHandler ¶
type WSArgument ¶
type WSArgument struct { Name string `json:"name"` Value *interface{} `json:"value,omitempty"` }
type WSInteraction ¶
type WSResponse ¶
Click to show internal directories.
Click to hide internal directories.