command

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2022 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EditMessage

type EditMessage struct {
	MessageID   string
	NewText     string
	NewHashtags []string
}

type EditMessageHandler

type EditMessageHandler struct {
	// contains filtered or unexported fields
}

func (EditMessageHandler) Hanlde

func (h EditMessageHandler) Hanlde(ctx context.Context, cmd EditMessage) error

type ForwardToChannels

type ForwardToChannels struct {
	Text        string
	HashtagList []string
	UserName    string
	UserID      string
	MessageID   int64
	MessageType domain.MessageType
	File        domain.TgFile
}

The ForwardToChannels command takes a listened message from the groups and gets the channels that match the hashtags in the message. It then sends a copy of the message to each channel with a reference to the owner and the original message.

type ForwardToChannelsHandler

type ForwardToChannelsHandler struct {
	// contains filtered or unexported fields
}

ForwardToChannelsHandler handles the ForwardToChannels command.

func NewForwardToChannelsHandler

func NewForwardToChannelsHandler(
	channelRepository domain.ChannelRepository,
	messageRepository domain.MessageRepository,
	messageSender domain.TgMessageSender,
) ForwardToChannelsHandler

NewForwardToChannelsHandler build a new instance of ForwardToChannelsHandler.

func (ForwardToChannelsHandler) Handle

Handle execute the command logic.

Jump to

Keyboard shortcuts

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