Skip to content

Commit

Permalink
Add NewMessageToChannel for #45.
Browse files Browse the repository at this point in the history
  • Loading branch information
Syfaro committed Apr 22, 2016
1 parent 369364b commit 7bf7559
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@ func NewMessage(chatID int64, text string) MessageConfig {
}
}

// 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,
Expand Down

0 comments on commit 7bf7559

Please sign in to comment.