all repos — telegram-bot-api @ 7bf755956c8c42f346269565bdb433b08a63df0b

Golang bindings for the Telegram Bot API

Add NewMessageToChannel for #45.
Syfaro syfaro@foxpaw.in
Fri, 22 Apr 2016 10:03:00 -0500
commit

7bf755956c8c42f346269565bdb433b08a63df0b

parent

369364b8c6c2bc563d8c3cef8fa47b40249f204b

1 files changed, 12 insertions(+), 0 deletions(-)

jump to
M helpers.gohelpers.go

@@ -18,6 +18,18 @@ DisableWebPagePreview: false,

} } +// NewMessageToChannel creates a new Message that is sent to a channel +// by username. +// username is the username of the channel, text is the message text. +func NewMessageToChannel(username string, text string) MessageConfig { + return MessageConfig{ + BaseChat: BaseChat{ + ChannelUsername: username, + }, + Text: text, + } +} + // NewForward creates a new forward. // // chatID is where to send it, fromChatID is the source chat,