discord

package
v0.0.0-...-bb841d2 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2023 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const Type = 1 << 0

Variables

View Source
var (
	Client *dgc.Client
	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
	// contains filtered or unexported fields
}

AuthorInteraction implements the core.Personifier interface for interactions

func (*AuthorInteraction) Admin

func (a *AuthorInteraction) Admin() (bool, error)

func (*AuthorInteraction) BotAdmin

func (a *AuthorInteraction) BotAdmin() (bool, error)

func (*AuthorInteraction) DisplayName

func (a *AuthorInteraction) DisplayName() (string, error)

func (*AuthorInteraction) ID

func (a *AuthorInteraction) ID() (string, error)

func (*AuthorInteraction) Mention

func (a *AuthorInteraction) Mention() (string, error)

func (*AuthorInteraction) Moderator

func (a *AuthorInteraction) Moderator() (bool, error)

func (*AuthorInteraction) Name

func (a *AuthorInteraction) Name() (string, error)

func (*AuthorInteraction) Scope

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

func (*AuthorInteraction) Subscriber

func (a *AuthorInteraction) Subscriber() (bool, error)

type AuthorMessage

type AuthorMessage struct {
	GuildID string
	Author  *dg.User
	Member  *dg.Member
	// contains filtered or unexported fields
}

AuthorMessage implements the core.Personifier interface

func (*AuthorMessage) Admin

func (a *AuthorMessage) Admin() (bool, error)

func (*AuthorMessage) BotAdmin

func (a *AuthorMessage) BotAdmin() (bool, error)

func (*AuthorMessage) DisplayName

func (a *AuthorMessage) DisplayName() (string, error)

func (*AuthorMessage) ID

func (a *AuthorMessage) ID() (string, error)

func (*AuthorMessage) Mention

func (a *AuthorMessage) Mention() (string, error)

func (*AuthorMessage) Moderator

func (a *AuthorMessage) Moderator() (bool, error)

func (*AuthorMessage) Name

func (a *AuthorMessage) Name() (string, error)

func (*AuthorMessage) Scope

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

func (*AuthorMessage) Subscriber

func (a *AuthorMessage) Subscriber() (bool, error)

type Here

type Here struct {
	ChannelID string
	GuildID   string
	Author    core.Personifier
	// contains filtered or unexported fields
}

Here implements the core.Placer interface.

func (*Here) IDExact

func (h *Here) IDExact() string

func (*Here) IDLogical

func (h *Here) IDLogical() 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) Leave

func (i *InteractionCreate) Leave() error

func (*InteractionCreate) Natural

func (i *InteractionCreate) Natural(msg any, urr core.Urr) (*core.Message, 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, urr core.Urr) (*core.Message, error)

func (*InteractionCreate) PlaceID

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

func (*InteractionCreate) QuoteCommand

func (i *InteractionCreate) QuoteCommand(cmd string) string

func (*InteractionCreate) Say

func (i *InteractionCreate) Say(buf io.Reader, s <-chan core.AudioState) error

func (*InteractionCreate) Send

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

func (*InteractionCreate) Write

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

type Message

type Message struct {
	Message *dg.Message
	VC      *dg.VoiceConnection
}

func (*Message) Natural

func (d *Message) Natural(msg any, urr core.Urr) (*core.Message, error)

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, urr core.Urr) (*core.Message, error)

func (*Message) PlaceID

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

func (*Message) QuoteCommand

func (d *Message) QuoteCommand(cmd string) string

func (*Message) Send

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

func (*Message) Write

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

type MessageCreate

type MessageCreate struct {
	Message *dg.MessageCreate
	VC      *dg.VoiceConnection
}

func (*MessageCreate) Natural

func (d *MessageCreate) Natural(msg any, urr core.Urr) (*core.Message, error)

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, urr core.Urr) (*core.Message, error)

func (*MessageCreate) PlaceID

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

func (*MessageCreate) QuoteCommand

func (d *MessageCreate) QuoteCommand(cmd string) string

func (*MessageCreate) Send

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

func (*MessageCreate) Write

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

type MessageEdit

type MessageEdit struct {
	Message *dg.MessageUpdate
	VC      *dg.VoiceConnection
}

func (*MessageEdit) Natural

func (d *MessageEdit) Natural(msg any, urr core.Urr) (*core.Message, error)

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, urr core.Urr) (*core.Message, error)

func (*MessageEdit) PlaceID

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

func (*MessageEdit) QuoteCommand

func (d *MessageEdit) QuoteCommand(cmd string) string

func (*MessageEdit) Send

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

func (*MessageEdit) Write

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

type Speaker

type Speaker struct {
	Author core.Personifier
	Here   core.Placer
	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) Leave

func (sp *Speaker) Leave() error

func (*Speaker) Say

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

Jump to

Keyboard shortcuts

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