discord

package
v0.0.0-...-daa8be9 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: AGPL-3.0 Imports: 14 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
)
View Source
var Frontend = &frontend{}

Functions

func PlaceInBackticks

func PlaceInBackticks(s string) string

func RegisterAppCommand

func RegisterAppCommand(cmd *dg.ApplicationCommand)

Types

type AuthorInteraction

type AuthorInteraction struct {
	GuildID string
	Member  *dg.Member
	User    *dg.User
}

Implement the core.Author interface for interactions

func (*AuthorInteraction) Admin

func (a *AuthorInteraction) Admin() bool

func (*AuthorInteraction) BotAdmin

func (a *AuthorInteraction) BotAdmin() bool

func (*AuthorInteraction) DisplayName

func (a *AuthorInteraction) DisplayName() string

func (*AuthorInteraction) ID

func (a *AuthorInteraction) ID() string

func (*AuthorInteraction) Mention

func (a *AuthorInteraction) Mention() string

func (*AuthorInteraction) Mod

func (a *AuthorInteraction) Mod() bool

func (*AuthorInteraction) Name

func (a *AuthorInteraction) Name() string

func (*AuthorInteraction) Scope

func (a *AuthorInteraction) Scope() (int64, error)

func (*AuthorInteraction) Subscriber

func (a *AuthorInteraction) Subscriber() bool

type AuthorMessage

type AuthorMessage struct {
	GuildID string
	Author  *dg.User
	Member  *dg.Member
}

Implement the core.Author interface for normal messages

func (*AuthorMessage) Admin

func (a *AuthorMessage) Admin() bool

func (*AuthorMessage) BotAdmin

func (a *AuthorMessage) BotAdmin() bool

func (*AuthorMessage) DisplayName

func (a *AuthorMessage) DisplayName() string

func (*AuthorMessage) ID

func (a *AuthorMessage) ID() string

func (*AuthorMessage) Mention

func (a *AuthorMessage) Mention() string

func (*AuthorMessage) Mod

func (a *AuthorMessage) Mod() bool

func (*AuthorMessage) Name

func (a *AuthorMessage) Name() string

func (*AuthorMessage) Scope

func (a *AuthorMessage) Scope() (int64, error)

func (*AuthorMessage) Subscriber

func (a *AuthorMessage) Subscriber() bool

type Here

type Here struct {
	ChannelID string
	GuildID   string
}

Here implements the core.Here interface.

func (*Here) ID

func (h *Here) ID() string

func (*Here) Name

func (h *Here) Name() string

func (*Here) ScopeExact

func (h *Here) ScopeExact() (int64, error)

func (*Here) ScopeLogical

func (h *Here) ScopeLogical() (int64, error)

type InteractionCreate

type InteractionCreate struct {
	Interaction *dg.InteractionCreate
	Data        *dg.ApplicationCommandInteractionData
	VC          *dg.VoiceConnection
}

func (*InteractionCreate) AuthorConnected

func (i *InteractionCreate) AuthorConnected() (bool, error)

func (*InteractionCreate) AuthorDeafened

func (i *InteractionCreate) AuthorDeafened() (bool, error)

func (*InteractionCreate) Channels

func (i *InteractionCreate) Channels() int

func (*InteractionCreate) Enabled

func (i *InteractionCreate) Enabled() bool

func (*InteractionCreate) FrameRate

func (i *InteractionCreate) FrameRate() int

func (*InteractionCreate) Join

func (i *InteractionCreate) Join() error

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) Say

func (i *InteractionCreate) Say(buf io.Reader, s *core.AudioState) 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 {
	Message *dg.Message
	VC      *dg.VoiceConnection
}

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 {
	Message *dg.MessageCreate
	VC      *dg.VoiceConnection
}

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 {
	Message *dg.MessageUpdate
	VC      *dg.VoiceConnection
}

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)

type Speaker

type Speaker struct {
	GuildID  string
	AuthorID string
	VC       *dg.VoiceConnection
}

func (*Speaker) AuthorConnected

func (sp *Speaker) AuthorConnected() (bool, error)

func (*Speaker) AuthorDeafened

func (sp *Speaker) AuthorDeafened() (bool, error)

func (*Speaker) Channels

func (*Speaker) Channels() int

func (*Speaker) Enabled

func (*Speaker) Enabled() bool

func (*Speaker) FrameRate

func (*Speaker) FrameRate() int

func (*Speaker) Join

func (sp *Speaker) Join() error

func (*Speaker) Say

func (sp *Speaker) Say(buf io.Reader, s *core.AudioState) error

Jump to

Keyboard shortcuts

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