add log
This commit is contained in:
@@ -3,6 +3,7 @@ package commands
|
|||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"log"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
|
|
||||||
tempest "github.com/Amatsagu/Tempest"
|
tempest "github.com/Amatsagu/Tempest"
|
||||||
@@ -15,6 +16,7 @@ var Pinned tempest.Command = tempest.Command{
|
|||||||
SlashCommandHandler: func(itx tempest.CommandInteraction) {
|
SlashCommandHandler: func(itx tempest.CommandInteraction) {
|
||||||
messages, err := getPinnedMessages(itx.Client.Rest, itx.ChannelId.String())
|
messages, err := getPinnedMessages(itx.Client.Rest, itx.ChannelId.String())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
log.Printf("failed to get messages: %s", err.Error())
|
||||||
itx.SendLinearReply(err.Error(), false)
|
itx.SendLinearReply(err.Error(), false)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user