discord

package
v0.0.0-...-e03fed0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2022 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const Type = 1 << 0

Variables

View Source
var (
	Session *dg.Session
	Admins  []string

	EmbedColor    = 0xAD88E0
	EmbedErrColor = 0xB14D4D
)

Functions

func Init

func Init(wgInit, wgStop *sync.WaitGroup, stop chan struct{}, token string)

func PlaceInBackticks

func PlaceInBackticks(s string) string

func RegisterAppCommand

func RegisterAppCommand(cmd *dg.ApplicationCommand)

Types

type InteractionCreate

type InteractionCreate struct {
	Session     *dg.Session
	Interaction *dg.InteractionCreate
	Data        *dg.ApplicationCommandInteractionData
}

func (*InteractionCreate) Admin

func (i *InteractionCreate) Admin() bool

func (*InteractionCreate) BotAdmin

func (i *InteractionCreate) BotAdmin() bool

func (*InteractionCreate) Mod

func (i *InteractionCreate) Mod() bool

func (*InteractionCreate) Parse

func (i *InteractionCreate) Parse() (*core.Message, error)

func (*InteractionCreate) Person

func (i *InteractionCreate) Person(id string) (int64, error)

func (*InteractionCreate) PersonID

func (i *InteractionCreate) PersonID(s, placeID string) (string, error)

func (*InteractionCreate) Ping

func (i *InteractionCreate) Ping(msg any, usrErr error) (*core.Message, error)

func (*InteractionCreate) PlaceExact

func (i *InteractionCreate) PlaceExact(id string) (int64, error)

func (*InteractionCreate) PlaceID

func (i *InteractionCreate) PlaceID(s string) (string, error)

func (*InteractionCreate) PlaceLogical

func (i *InteractionCreate) PlaceLogical(id string) (int64, error)

func (*InteractionCreate) Send

func (i *InteractionCreate) Send(msg any, usrErr error) (*core.Message, error)

func (*InteractionCreate) Usage

func (i *InteractionCreate) Usage(usage string) any

func (*InteractionCreate) Write

func (i *InteractionCreate) Write(msg any, usrErr error) (*core.Message, error)

type Message

type Message struct {
	Session *dg.Session
	Message *dg.Message
}

func CreateClient

func CreateClient(author, channel int64, msgID string) (*Message, error)

func (*Message) Admin

func (d *Message) Admin() bool

func (*Message) BotAdmin

func (d *Message) BotAdmin() bool

func (*Message) Mod

func (d *Message) Mod() bool

func (*Message) Parse

func (d *Message) Parse() (*core.Message, error)

func (*Message) Person

func (d *Message) Person(id string) (int64, error)

func (*Message) PersonID

func (d *Message) PersonID(s, placeID string) (string, error)

func (*Message) Ping

func (d *Message) Ping(msg any, usrErr error) (*core.Message, error)

func (*Message) PlaceExact

func (d *Message) PlaceExact(id string) (int64, error)

func (*Message) PlaceID

func (d *Message) PlaceID(s string) (string, error)

func (*Message) PlaceLogical

func (d *Message) PlaceLogical(id string) (int64, error)

func (*Message) Send

func (d *Message) Send(msg any, usrErr error) (*core.Message, error)

func (*Message) Usage

func (d *Message) Usage(usage string) any

func (*Message) Write

func (d *Message) Write(msg any, usrErr error) (*core.Message, error)

type MessageCreate

type MessageCreate struct {
	Session *dg.Session
	Message *dg.MessageCreate
}

func (*MessageCreate) Admin

func (d *MessageCreate) Admin() bool

func (*MessageCreate) BotAdmin

func (d *MessageCreate) BotAdmin() bool

func (*MessageCreate) Mod

func (d *MessageCreate) Mod() bool

func (*MessageCreate) Parse

func (d *MessageCreate) Parse() (*core.Message, error)

func (*MessageCreate) Person

func (d *MessageCreate) Person(id string) (int64, error)

func (*MessageCreate) PersonID

func (d *MessageCreate) PersonID(s, placeID string) (string, error)

func (*MessageCreate) Ping

func (d *MessageCreate) Ping(msg any, usrErr error) (*core.Message, error)

func (*MessageCreate) PlaceExact

func (d *MessageCreate) PlaceExact(id string) (int64, error)

func (*MessageCreate) PlaceID

func (d *MessageCreate) PlaceID(s string) (string, error)

func (*MessageCreate) PlaceLogical

func (d *MessageCreate) PlaceLogical(id string) (int64, error)

func (*MessageCreate) Send

func (d *MessageCreate) Send(msg any, usrErr error) (*core.Message, error)

func (*MessageCreate) Usage

func (d *MessageCreate) Usage(usage string) any

func (*MessageCreate) Write

func (d *MessageCreate) Write(msg any, usrErr error) (*core.Message, error)

type MessageEdit

type MessageEdit struct {
	Session *dg.Session
	Message *dg.MessageUpdate
}

func (*MessageEdit) Admin

func (d *MessageEdit) Admin() bool

func (*MessageEdit) BotAdmin

func (d *MessageEdit) BotAdmin() bool

func (*MessageEdit) Mod

func (d *MessageEdit) Mod() bool

func (*MessageEdit) Parse

func (d *MessageEdit) Parse() (*core.Message, error)

func (*MessageEdit) Person

func (d *MessageEdit) Person(id string) (int64, error)

func (*MessageEdit) PersonID

func (d *MessageEdit) PersonID(s, placeID string) (string, error)

func (*MessageEdit) Ping

func (d *MessageEdit) Ping(msg any, usrErr error) (*core.Message, error)

func (*MessageEdit) PlaceExact

func (d *MessageEdit) PlaceExact(id string) (int64, error)

func (*MessageEdit) PlaceID

func (d *MessageEdit) PlaceID(s string) (string, error)

func (*MessageEdit) PlaceLogical

func (d *MessageEdit) PlaceLogical(id string) (int64, error)

func (*MessageEdit) Send

func (d *MessageEdit) Send(msg any, usrErr error) (*core.Message, error)

func (*MessageEdit) Usage

func (d *MessageEdit) Usage(usage string) any

func (*MessageEdit) Write

func (d *MessageEdit) Write(msg any, usrErr error) (*core.Message, error)

Jump to

Keyboard shortcuts

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