Skip to content

Commit

Permalink
feat: update example code
Browse files Browse the repository at this point in the history
  • Loading branch information
amatsagu committed Dec 24, 2023
1 parent b64d29e commit 9972d0a
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions example/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ module example-bot
go 1.21.5

require github.com/joho/godotenv v1.5.1

require github.com/Amatsagu/Tempest v1.1.4-0.20231210165524-cd3793fb0c00
require github.com/Amatsagu/Tempest v1.1.36-0.20231224135111-b64d29eedf86
4 changes: 2 additions & 2 deletions example/go.sum
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
github.com/Amatsagu/Tempest v1.1.4-0.20231210165524-cd3793fb0c00 h1:rpWSYYXV1W39yRy9sAC66R+E0YOEWpyOo2JI9K8Trc0=
github.com/Amatsagu/Tempest v1.1.4-0.20231210165524-cd3793fb0c00/go.mod h1:nKYECgmXvrjmlTMpG6YM++MTjQHpPlkPXzKzQ/Wn5B0=
github.com/Amatsagu/Tempest v1.1.36-0.20231224135111-b64d29eedf86 h1:BIcNeFsva7vC39PKPr7zrEWjBKnBrwyn1rr7IIN5M9A=
github.com/Amatsagu/Tempest v1.1.36-0.20231224135111-b64d29eedf86/go.mod h1:nKYECgmXvrjmlTMpG6YM++MTjQHpPlkPXzKzQ/Wn5B0=
github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0=
github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
2 changes: 1 addition & 1 deletion example/internal/command/auto-complete.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var AutoComplete tempest.Command = tempest.Command{
AutoComplete: true,
},
},
AutoCompleteHandler: func(itx *tempest.CommandInteraction) []tempest.Choice {
AutoCompleteHandler: func(itx tempest.CommandInteraction) []tempest.Choice {
examples := []tempest.Choice{
{
Name: "Select first option!",
Expand Down
2 changes: 1 addition & 1 deletion example/internal/command/modal.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ var Modal tempest.Command = tempest.Command{
},
}

func HelloModal(itx *tempest.ModalInteraction) {
func HelloModal(itx tempest.ModalInteraction) {
value := itx.GetInputValue("example-text-input")
if value == "" {
itx.AcknowledgeWithLinearMessage("Oh, how about trying pizza?", false)
Expand Down
2 changes: 1 addition & 1 deletion example/internal/command/static.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ var Static tempest.Command = tempest.Command{
}

// This function will be used at every button click, there's no max time limit.
func HelloStatic(itx *tempest.ComponentInteraction) {
func HelloStatic(itx tempest.ComponentInteraction) {
err := itx.AcknowledgeWithMessage(tempest.ResponseMessageData{
Content: fmt.Sprintf("Hello <@%d>!", itx.Member.User.ID),
}, false)
Expand Down

0 comments on commit 9972d0a

Please sign in to comment.