Skip to content

Commit

Permalink
Merge pull request #39 from mickmister/init-slash-command
Browse files Browse the repository at this point in the history
Support initialization of manually created SlashCommand
  • Loading branch information
ericjaystevens committed Oct 28, 2020
2 parents 17a1f41 + e82b79c commit 50f125e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions slashparse.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ func NewSlashCommand(slashDef []byte) (s SlashCommand, err error) {
return s, unmarshalErr
}

return InitSlashCommand(s)
}

//InitSlashCommand initializes the provided slash command
func InitSlashCommand(s SlashCommand) (SlashCommand, error) {
validationErr := validateSlashDefinition(&s)
if validationErr != nil {
return s, validationErr
Expand Down

0 comments on commit 50f125e

Please sign in to comment.