command

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnnouncementMessage

type AnnouncementMessage struct {
	UserNotice
	Message string
}

type AnonGiftPaidUpgradeMessage

type AnonGiftPaidUpgradeMessage struct {
	UserNotice
	PromoGiftTotal int
	PromoName      string
}

type Badge

type Badge struct {
	Name    string
	Version int
}

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"

	// Notice
	SubsOn       MsgID = "subs_on"
	SubsOff      MsgID = "subs_off"
	EmoteOnlyOn  MsgID = "emote_only_on"
	EmoteOnlyOff MsgID = "emote_only_off"
	FollowersOn  MsgID = "followers_on"
	FollowersOff MsgID = "followers_off"
	SlowOn       MsgID = "slow_on"
	SlowOff      MsgID = "slow_off"
	R9kOn        MsgID = "r9k_on" // also known as unique chat
	R9kOff       MsgID = "r9k_off"
)

type Notice

type Notice struct {
	ChannelUserName string
	Message         string
	MsgID           MsgID
}

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) IRC

func (p *PrivateMessage) IRC() string

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