interactions yay!!
This commit is contained in:
parent
b9a05bedf9
commit
f60033a3e4
30 changed files with 716 additions and 44 deletions
24
interactions/responses.go
Normal file
24
interactions/responses.go
Normal file
|
@ -0,0 +1,24 @@
|
|||
package interactions
|
||||
|
||||
import "github.com/gofiber/fiber/v3"
|
||||
|
||||
func Deferred(c fiber.Ctx) (InteractionResponse, error) {
|
||||
return InteractionResponse{
|
||||
Type: ResponseDeferredChannelMessage,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func String(msg string, ephemeral bool) (InteractionResponse, error) {
|
||||
flags := 0
|
||||
if ephemeral {
|
||||
flags = FlagEphemeral
|
||||
}
|
||||
|
||||
return InteractionResponse{
|
||||
Type: ResponseChannelMessage,
|
||||
Data: InteractionResponseData{
|
||||
Content: msg,
|
||||
Flags: flags,
|
||||
},
|
||||
}, nil
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue