Documentation ¶
Index ¶
- type Channel
- func (u *Channel) GetAccessHash() int64
- func (u *Channel) GetID() int64
- func (v *Channel) GetInputChannel() tg.InputChannelClass
- func (v *Channel) GetInputPeer() tg.InputPeerClass
- func (*Channel) GetInputUser() tg.InputUserClass
- func (*Channel) IsAChannel() bool
- func (*Channel) IsAChat() bool
- func (*Channel) IsAUser() bool
- func (u *Channel) Raw() *tg.Channel
- type Chat
- func (*Chat) GetAccessHash() int64
- func (u *Chat) GetID() int64
- func (*Chat) GetInputChannel() tg.InputChannelClass
- func (v *Chat) GetInputPeer() tg.InputPeerClass
- func (*Chat) GetInputUser() tg.InputUserClass
- func (*Chat) IsAChannel() bool
- func (*Chat) IsAChat() bool
- func (*Chat) IsAUser() bool
- func (u *Chat) Raw() *tg.Chat
- type EffectiveChat
- type EmptyUC
- func (*EmptyUC) GetAccessHash() int64
- func (*EmptyUC) GetID() int64
- func (*EmptyUC) GetInputChannel() tg.InputChannelClass
- func (*EmptyUC) GetInputPeer() tg.InputPeerClass
- func (*EmptyUC) GetInputUser() tg.InputUserClass
- func (*EmptyUC) IsAChannel() bool
- func (*EmptyUC) IsAChat() bool
- func (*EmptyUC) IsAUser() bool
- type Message
- type User
- func (u *User) GetAccessHash() int64
- func (u *User) GetID() int64
- func (*User) GetInputChannel() tg.InputChannelClass
- func (v *User) GetInputPeer() tg.InputPeerClass
- func (v *User) GetInputUser() tg.InputUserClass
- func (*User) IsAChannel() bool
- func (*User) IsAChat() bool
- func (*User) IsAUser() bool
- func (u *User) Raw() *tg.User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Channel ¶
Channel implements EffectiveChat interface for tg.Channel chats.
func (*Channel) GetAccessHash ¶
Use this method to get access hash of the effective chat.
func (*Channel) GetInputChannel ¶
func (v *Channel) GetInputChannel() tg.InputChannelClass
Use this method to get InputChannelClass
func (*Channel) GetInputPeer ¶
func (v *Channel) GetInputPeer() tg.InputPeerClass
Use this method to get InputPeerClass
func (*Channel) GetInputUser ¶
func (*Channel) GetInputUser() tg.InputUserClass
Use this method to get InputUserClass Always nil for Channel
func (*Channel) IsAChannel ¶
IsAChannel returns true for a channel.
type Chat ¶
Chat implements EffectiveChat interface for tg.Chat chats.
func (*Chat) GetAccessHash ¶
Use this method to get access hash of the effective chat.
func (*Chat) GetInputChannel ¶
func (*Chat) GetInputChannel() tg.InputChannelClass
Use this method to get InputChannelClass Always nil for Chat
func (*Chat) GetInputPeer ¶
func (v *Chat) GetInputPeer() tg.InputPeerClass
Use this method to get InputPeerClass
func (*Chat) GetInputUser ¶
func (*Chat) GetInputUser() tg.InputUserClass
Use this method to get InputUserClass Always nil for Chat
type EffectiveChat ¶
type EffectiveChat interface { // Use this method to get chat id. GetID() int64 // Use this method to get access hash of the effective chat. GetAccessHash() int64 // Use this method to check if the effective chat is a channel. IsAChannel() bool // Use this method to check if the effective chat is a chat. IsAChat() bool // Use this method to check if the effective chat is a user. IsAUser() bool // Use this method to get InputUserClass GetInputUser() tg.InputUserClass // Use this method to get InputUserClass GetInputChannel() tg.InputChannelClass // Use this method to get InputUserClass GetInputPeer() tg.InputPeerClass }
EffectiveChat interface covers the all three types of chats: - tg.User - tg.Chat - tg.Channel
This interface is implemented by the following structs: - User: If the chat is a tg.User then this struct will be returned. - Chat: if the chat is a tg.Chat then this struct will be returned. - Channel: if the chat is a tg.Channel then this struct will be returned. - EmptyUC: if the PeerID doesn't match any of the above cases then EmptyUC struct is returned.
type EmptyUC ¶
type EmptyUC struct{}
EmptyUC implements EffectiveChat interface for empty chats.
func (*EmptyUC) GetAccessHash ¶
Use this method to get access hash of effective chat. Always 0 for EmptyUC
func (*EmptyUC) GetInputChannel ¶
func (*EmptyUC) GetInputChannel() tg.InputChannelClass
Use this method to get InputChannelClass Always nil for EmptyUC
func (*EmptyUC) GetInputPeer ¶
func (*EmptyUC) GetInputPeer() tg.InputPeerClass
Use this method to get InputPeerClass Always nil for EmptyUC
func (*EmptyUC) GetInputUser ¶
func (*EmptyUC) GetInputUser() tg.InputUserClass
Use this method to get InputUserClass Always nil for EmptyUC
func (*EmptyUC) IsAChannel ¶
IsAChannel returns true for a channel. Always false for EmptyUC
type Message ¶
type Message struct { *tg.Message ReplyToMessage *Message Text string IsService bool Action tg.MessageActionClass }
func ConstructMessage ¶
func ConstructMessage(m tg.MessageClass) *Message
type User ¶
User implements EffectiveChat interface for tg.User chats.
func (*User) GetAccessHash ¶
Use this method to get access hash of the effective chat.
func (*User) GetInputChannel ¶
func (*User) GetInputChannel() tg.InputChannelClass
Use this method to get InputChannelClass Always nil for User
func (*User) GetInputPeer ¶
func (v *User) GetInputPeer() tg.InputPeerClass
Use this method to get InputPeerClass
func (*User) GetInputUser ¶
func (v *User) GetInputUser() tg.InputUserClass
Use this method to get InputUserClass