Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Message ¶
type Message struct { Date time.Time // Time Source bool // IRC (false) or TG (true) Nick string // Nickname in both IRC and Telegram Text string ID int // Message ID, Telegram only FromID int // From user ID, Telegram only FirstName string // Realname, Telegram only LastName string // Realname, Telegram only // In IRC: CTCP (ACTION), kick, topic // In Telegram: medias, replies, forwards, pins, edits, new/left members... Extra map[string]string }
Message represents a generic message which may be either from TG or IRC.
type Relay ¶
type Relay struct { TeleCh chan Message TeleServiceCh chan ServiceMessage IRCh chan Message IRCServiceCh chan ServiceMessage // used for messages that need to be // run even when IRC bot not in channel TeleAlwaysCh chan ServiceMessage }
Relay contains channels used by goroutines to exchange messages.
type ServiceMessage ¶
ServiceMessage represents a service message, which is not relayed.
Click to show internal directories.
Click to hide internal directories.