Documentation ¶
Index ¶
- func AddChatMembers(ctx context.Context, client *telegram.Client, chatPeer tg.InputPeerClass, ...) (bool, error)
- func AddReaction(ctx context.Context, client *telegram.Client, link string, emojiChar string) error
- func AddView(ctx context.Context, client *telegram.Client, link string) error
- func CreateChannel(ctx context.Context, client *telegram.Client, title string, about string, ...) (*tg.Channel, error)
- func CreateChat(ctx context.Context, client *telegram.Client, title string, ...) (*tg.Chat, error)
- func DemoteChatMember(ctx context.Context, client *telegram.Client, chat *tg.InputChannel, ...) (bool, error)
- func ForwardMessageFromPublicChannel(ctx context.Context, client *telegram.Client, deepLink string, ...) error
- func GetSimilarChannels(ctx context.Context, client *telegram.Client, channelUsername string) ([]*tg.Channel, error)
- func GetUpdateFromUpdates(updates tg.UpdatesClass) ([]tg.UpdateClass, []tg.ChatClass, []tg.UserClass)
- func JoinChannel(ctx context.Context, client *telegram.Client, username string) error
- func JoinPrivateChannel(ctx context.Context, client *telegram.Client, hash string) error
- func PromoteChatMember(ctx context.Context, client *telegram.Client, chat *tg.InputChannel, ...) (bool, error)
- type ChannelMonitoring
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddChatMembers ¶
func AddReaction ¶
AddReaction adds a reaction as well as a view to the current post. It accepts a message deep link, such as: https://t.me/channel_username/<message_id: number>
func AddView ¶
AddView increments the number of view of a channel post. It accepts a message deep link, such as: https://t.me/channel_username/<message_id: number>
func CreateChannel ¶
func CreateChat ¶
func DemoteChatMember ¶
func ForwardMessageFromPublicChannel ¶
func ForwardMessageFromPublicChannel(ctx context.Context, client *telegram.Client, deepLink string, destinationChannelUsername string) error
ForwardMessageFromPublicChannel forwards a message from a public channel thanks to the message deep link
func GetSimilarChannels ¶
func GetUpdateFromUpdates ¶
func GetUpdateFromUpdates(updates tg.UpdatesClass) ([]tg.UpdateClass, []tg.ChatClass, []tg.UserClass)
func JoinChannel ¶
JoinChannel joins a public channel / group chat, that has an username.
func JoinPrivateChannel ¶
func PromoteChatMember ¶
Types ¶
type ChannelMonitoring ¶
type ChannelMonitoring struct {
*messages.Monitoring
}
func NewChannelMonitoring ¶
func NewChannelMonitoring(ctx context.Context, client *telegram.Client, username string, dispatcher tg.UpdateDispatcher, strip bool) (*ChannelMonitoring, error)
NewChannelMonitoring creates a new `ChannelMonitoring` struct. NOTE: If the channel is private, activate the parameters to show ID of entities you're interacting with on Telegram Desktop, or use an alternative client like NekoGram on Android, or NiceGram on iOS. You should be subscribed to the channel to do so. NOTE: The strip parameter means that you want to remove special characters and spaces from messages you will be parsing, because you don't need them, and, its easier to make regular expressions this way.