-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add entry point commands + callback updates (#390)
* Add interaction callback response * Add entry point commands + callback updates * add missing newlines * handle entry point command interactions * add LaunchActivity to InteractionEvent * fix bad copypaste * make Handler optional when creating * make Handler a bointer * adjust func so it makes more sense * adjust comment * add newline back :-) * address review * remove🅱️ ointers
- Loading branch information
Showing
15 changed files
with
418 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package discord | ||
|
||
import "github.com/disgoorg/snowflake/v2" | ||
|
||
type InteractionCallbackResponse struct { | ||
Interaction InteractionCallback `json:"interaction"` | ||
Resource *InteractionCallbackResource `json:"resource"` | ||
} | ||
|
||
type InteractionCallback struct { | ||
ID snowflake.ID `json:"id"` | ||
Type InteractionType `json:"type"` | ||
ActivityInstanceID string `json:"activity_instance_id"` | ||
ResponseMessageID snowflake.ID `json:"response_message_id"` | ||
ResponseMessageLoading bool `json:"response_message_loading"` | ||
ResponseMessageEphemeral bool `json:"response_message_ephemeral"` | ||
} | ||
|
||
type InteractionCallbackResource struct { | ||
Type InteractionResponseType `json:"type"` | ||
ActivityInstance *InteractionCallbackActivityInstance `json:"activity_instance"` | ||
Message *Message `json:"message"` | ||
} | ||
|
||
type InteractionCallbackActivityInstance struct { | ||
ID string `json:"id"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.