filter

package
v0.0.0-...-367965b Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter

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

func New

func New(expr pins.FilterExpr) (*Filter, error)

New creates a new Discord client.

func (Filter) Filter

func (m Filter) Filter(data MessageData) (bool, error)

type MessageData

type MessageData struct {
	ChannelParentID discord.ChannelID
	ChannelID       discord.ChannelID
	ChannelName     string
	Timestamp       time.Time
	AuthorID        discord.UserID
	AuthorName      string
	Text            string
}

MessageData is the data for a message in a CEL expression.

Jump to

Keyboard shortcuts

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