diff --git a/examples/messages/messages.go b/examples/messages/messages.go index 20e8f19a9..dd7f02da0 100644 --- a/examples/messages/messages.go +++ b/examples/messages/messages.go @@ -22,7 +22,12 @@ func main() { */ } - channelID, timestamp, err := api.PostMessage("CHANNEL_ID", slack.MsgOptionText("Some text", false), slack.MsgOptionAttachments(attachment)) + channelID, timestamp, err := api.PostMessage( + "CHANNEL_ID", + slack.MsgOptionText("Some text", false), + slack.MsgOptionAttachments(attachment), + slack.MsgOptionAsUser(true), // Add this if you want that the bot would post message as a user, otherwise it will send response using the default slackbot + ) if err != nil { fmt.Printf("%s\n", err) return