seabird_discord

package module
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: MIT Imports: 11 Imported by: 0

README

seabird-discord-backend

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActionText

func ActionText(rawText string) (string, bool)

ActionText tries to guess if a message was an action. It returns the action text without formatting and if it thinks the text was an action.

func ComesFromDM

func ComesFromDM(s *discordgo.Session, m *discordgo.MessageCreate) (bool, error)

ComesFromDM returns true if a message comes from a DM channel

func ReplaceMentions

func ReplaceMentions(l zerolog.Logger, s *discordgo.Session, m *discordgo.Message) string

Types

type Backend

type Backend struct {
	// contains filtered or unexported fields
}

func New

func New(config DiscordConfig) (*Backend, error)

func (*Backend) Run

func (b *Backend) Run() error

type DiscordConfig

type DiscordConfig struct {
	Logger                zerolog.Logger
	CommandPrefix         string
	DiscordToken          string
	SeabirdID             string
	SeabirdHost           string
	SeabirdToken          string
	DiscordChannelMapping string
}

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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