discord

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBotTokenNotSet = fmt.Errorf("discord: Discord.BotToken not set in world config")
	ErrChannelNotSet  = fmt.Errorf("discord: Discord.ChannelID not set in world config")
)
View Source
var AnnounceEnabled models.PropID = "gophercraft.realm.chat.AnnounceEnabled"

Functions

This section is empty.

Types

type DiscordPlugin

type DiscordPlugin struct {
	Server        *realm.Server
	Session       *discordgo.Session
	BridgeHook    *discordgo.Webhook
	ChannelID     string
	NonFatalError error
}

func (*DiscordPlugin) Activated

func (p *DiscordPlugin) Activated() (bool, error)

func (*DiscordPlugin) GetChannelName

func (p *DiscordPlugin) GetChannelName() string

func (*DiscordPlugin) Init

func (p *DiscordPlugin) Init(server *realm.Server, info *realm.PluginInfo) error

func (*DiscordPlugin) SendMessageFrom

func (p *DiscordPlugin) SendMessageFrom(s *realm.Session, body string) error

func (*DiscordPlugin) Terminate

func (p *DiscordPlugin) Terminate() error

Jump to

Keyboard shortcuts

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