command

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnnouncementColor added in v0.0.2

type AnnouncementColor string
const (
	Primary AnnouncementColor = "PRIMARY"
	Blue    AnnouncementColor = "BLUE"
	Green   AnnouncementColor = "GREEN"
	Orange  AnnouncementColor = "ORANGE"
	Purple  AnnouncementColor = "PURPLE"
)

func (AnnouncementColor) RGBHex added in v0.0.2

func (a AnnouncementColor) RGBHex() string

func (AnnouncementColor) String added in v0.0.2

func (a AnnouncementColor) String() string

type AnnouncementMessage

type AnnouncementMessage struct {
	UserNotice
	ParamColor AnnouncementColor
	Message    string
}

type AnonGiftPaidUpgradeMessage

type AnonGiftPaidUpgradeMessage struct {
	UserNotice
	PromoGiftTotal int
	PromoName      string
}

type Badge

type Badge struct {
	Name    string
	Version int
}

func (Badge) String added in v0.0.5

func (b Badge) String() string

type ClearChat

type ClearChat struct {
	BanDuration     int // in seconds
	RoomID          string
	ChannelUserName string
	TargetUserID    string
	TMISentTS       time.Time
	UserName        string
}

func (*ClearChat) IRC

func (c *ClearChat) IRC() string

type ClearMessage

type ClearMessage struct {
	Login           string
	RoomID          string
	ChannelUserName string
	TargetMsgID     string
	TMISentTS       time.Time
}

func (*ClearMessage) IRC

func (c *ClearMessage) IRC() string

type Emote

type Emote struct {
	ID    string
	Start int
	End   int
}

type GiftPaidUpgradeMessage

type GiftPaidUpgradeMessage struct {
	UserNotice
	PromoGiftTotal int
	PromoName      string
	SenderLogin    string
	SenderName     string
}

type JoinMessage

type JoinMessage struct {
	Channel string
}

func (JoinMessage) IRC

func (j JoinMessage) IRC() string

type MsgID

type MsgID string
const (
	// UserNotice
	Sub                 MsgID = "sub"
	ReSub               MsgID = "resub"
	SubGift             MsgID = "subgift"
	SubMysteryGift      MsgID = "submysterygift"
	GiftPaidUpgrade     MsgID = "giftpaidupgrade"
	RewardGift          MsgID = "rewardgift"
	AnonGiftPaidUpgrade MsgID = "anongiftpaidupgrade"
	Raid                MsgID = "raid"
	UnRaid              MsgID = "unraid"
	Ritual              MsgID = "ritual"
	BitsBadgeTier       MsgID = "bitsbadgetier"
	Announcement        MsgID = "announcement"
)

type Notice

type Notice struct {
	ChannelUserName string
	Message         string
	MsgID           MsgID

	FakeTimestamp time.Time
}

func (*Notice) IRC

func (n *Notice) IRC() string

type PartMessage

type PartMessage struct {
	Channel string
}

func (PartMessage) IRC

func (p PartMessage) IRC() string

type PingMessage

type PingMessage struct{}

func (PingMessage) IRC

func (p PingMessage) IRC() string

type PongMessage

type PongMessage struct{}

func (PongMessage) IRC

func (p PongMessage) IRC() string

type PrivateMessage

type PrivateMessage struct {
	BadgeInfo   []Badge
	Badges      []Badge
	Bits        int
	Color       string
	DisplayName string
	Emotes      []Emote
	ID          string
	Mod         bool
	FirstMsg    bool

	// Hype chat
	PaidAmount          int
	PaidCurrency        string
	PaidExponent        int
	PaidLevel           string
	PaidIsSystemMessage bool

	// Reply
	ParentMsgID           string
	ParentUserID          string
	ParentUserLogin       string
	ParentDisplayName     string
	ParentMsgBody         string
	ThreadParentMsgID     string
	ThreadParentUserLogin string

	RoomID          string
	ChannelUserName string
	Subscriber      bool
	TMISentTS       time.Time
	Turbo           bool
	UserID          string
	UserType        UserType
	VIP             bool

	Message string
}

func (*PrivateMessage) Clone added in v0.4.0

func (p *PrivateMessage) Clone() *PrivateMessage

func (*PrivateMessage) IRC

func (p *PrivateMessage) IRC() string

func (PrivateMessage) MarshalEasyJSON added in v0.5.0

func (v PrivateMessage) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (*PrivateMessage) UnmarshalEasyJSON added in v0.5.0

func (v *PrivateMessage) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

type RaidMessage

type RaidMessage struct {
	UserNotice
	DisplayName string
	Login       string
	ViewerCount int
}

type RitualMessage

type RitualMessage struct {
	UserNotice
	RitualName string
	Message    string
}

type RoomState

type RoomState struct {
	EmoteOnly       *bool
	FollowersOnly   *int
	R9K             *bool
	RoomID          string
	ChannelUserName string
	Slow            *int
	SubsOnly        *bool
}

Only the changed values are set RoomState does not represent the final state

func (*RoomState) IRC

func (r *RoomState) IRC() string

type SubGiftMessage

type SubGiftMessage struct {
	UserNotice
	Months             int
	ReceiptDisplayName string
	RecipientID        string
	RecipientUserName  string
	SubPlan            SubPlan
	SubPlanName        string
	GiftMonths         int
}

type SubMessage

type SubMessage struct {
	UserNotice
	Message           string
	CumulativeMonths  int
	ShouldShareStreak bool
	StreakMonths      int
	SubPlan           SubPlan
	SubPlanName       string
}

type SubPlan

type SubPlan string
const (
	Prime SubPlan = "Prime"
	Tier1 SubPlan = "1000"
	Tier2 SubPlan = "2000"
	Tier3 SubPlan = "3000"
)

func (SubPlan) String

func (s SubPlan) String() string

type UserNotice

type UserNotice struct {
	BadgeInfo       []Badge
	Badges          []Badge
	Color           string
	DisplayName     string
	Emotes          []Emote
	ID              string
	Login           string
	Mod             bool
	MsgID           MsgID
	RoomID          string
	ChannelUserName string
	Subscriber      bool
	SystemMsg       string
	TMISentTS       time.Time
	Turbo           bool
	UserID          string
	UserType        UserType
}

func (*UserNotice) IRC

func (u *UserNotice) IRC() string

type UserState

type UserState struct {
	BadgeInfo       []Badge
	Badges          []Badge
	Color           string
	DisplayName     string
	ChannelUserName string
	EmoteSets       []string
	ID              string
	Subscriber      bool
	Turbo           bool
	UserType        UserType
}

func (*UserState) IRC

func (u *UserState) IRC() string

type UserType

type UserType string
const (
	Empty     UserType = "" // normal user
	Admin     UserType = "admin"
	GlobalMod UserType = "global_mod"
	Staff     UserType = "staff"
)

type Whisper

type Whisper struct {
	Badges      []Badge
	Color       string
	DisplayName string
	Emotes      []Emote
	ID          string
	ThreadID    string
	Turbo       bool
	UserID      string
	UserType    UserType
	Message     string
}

func (*Whisper) IRC

func (w *Whisper) IRC() string

Jump to

Keyboard shortcuts

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