Skip to content

Commit

Permalink
update code documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
zekroTJA committed Nov 21, 2021
1 parent 57d6f96 commit 7d2b21f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions command.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,19 @@ import (
"github.com/bwmarrin/discordgo"
)

// Command specifies the base interface for an
// application command.
type Command interface {
// Name returns the unique name of the command.
Name() string

// Description returns a brief text which concisely
// describes the commands purpose.
//
// Currently, this is ignored by user and message
// commands, because the API currently does not
// support descriptions for these types of
// application commands.
Description() string

// Run is called on command invokation getting
Expand Down
3 changes: 3 additions & 0 deletions context.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ func newCtx() *Ctx {

// Respond to an interaction event with the given
// interaction response payload.
//
// When an interaction has already been responded to,
// the response will be edited instead on execution.
func (c *Ctx) Respond(r *discordgo.InteractionResponse) (err error) {
if c.responded {
if r == nil || r.Data == nil {
Expand Down

0 comments on commit 7d2b21f

Please sign in to comment.