irc

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TagBadgeInfo ...
	TagBadgeInfo string = "badge-info"
	// TagBadges ...
	TagBadges string = "badges"
	// TagColor ...
	TagColor string = "color"
	// TagDisplayName ...
	TagDisplayName string = "display-name"
	// TagEmotes ...
	TagEmotes string = "emotes"
	// TagFlags ...
	TagFlags string = "flags"
	// TagSubscriber 1 if the user has a subscriber badge; otherwise, 0.
	//
	// [deprecated] use badges
	TagSubscriber string = "subscriber"
)

Variables

View Source
var ErrRateExceeded = errors.New("ratelimit exceeded")

Functions

This section is empty.

Types

type ChatClient

type ChatClient struct {
	Nick string

	OnSend     func(command string)
	OnReceived func(command string)
	OnError    func(format string, args ...interface{})
	// contains filtered or unexported fields
}

ChatClient ...

func New

func New(token string) (*ChatClient, error)

New ...

func (*ChatClient) Close

func (c *ChatClient) Close() error

Close ...

func (*ChatClient) JoinContext

func (c *ChatClient) JoinContext(ctx context.Context, channel string) error

func (*ChatClient) OnMessage

func (c *ChatClient) OnMessage(handler func(msg *Message) error)

OnMessage ...

func (*ChatClient) OpenContext

func (c *ChatClient) OpenContext(ctx context.Context, url string) error

OpenContext ...

func (*ChatClient) Send

func (c *ChatClient) Send(channel, content string) error

Send

func (*ChatClient) SendTimeout

func (c *ChatClient) SendTimeout(channel, content string, timeout time.Duration) error

SendTimeout

type Message

type Message struct {
	Tags    map[string]string
	Trailer string
	Sender  string
	Channel string
	Command string
	Prefix  string
	Args    []string
}

Message ...

Jump to

Keyboard shortcuts

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