gocord

package module
v0.0.0-...-c13493f Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Token string
	// contains filtered or unexported fields
}

func NewClient

func NewClient(token string) *Client

func (*Client) AddCommand

func (c *Client) AddCommand(name string, handler func(*MessageCreate))

func (*Client) SendMessage

func (c *Client) SendMessage(channelID string, content string) error

func (*Client) Start

func (c *Client) Start() error

type Message

type Message struct {
	ID        string `json:"id"`
	ChannelID string `json:"channel_id"`
	Content   string `json:"content"`
}

type MessageCreate

type MessageCreate struct {
	Message *Message `json:"message"`
}

Jump to

Keyboard shortcuts

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