We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 369364b commit 7bf7559Copy full SHA for 7bf7559
helpers.go
@@ -18,6 +18,18 @@ func NewMessage(chatID int64, text string) MessageConfig {
18
}
19
20
21
+// NewMessageToChannel creates a new Message that is sent to a channel
22
+// by username.
23
+// username is the username of the channel, text is the message text.
24
+func NewMessageToChannel(username string, text string) MessageConfig {
25
+ return MessageConfig{
26
+ BaseChat: BaseChat{
27
+ ChannelUsername: username,
28
+ },
29
+ Text: text,
30
+ }
31
+}
32
+
33
// NewForward creates a new forward.
34
//
35
// chatID is where to send it, fromChatID is the source chat,
0 commit comments