Remove wishlist command
This commit is contained in:
parent
b5a34e3ab1
commit
1af2f57240
|
@ -17,7 +17,6 @@ import (
|
||||||
const SlashCommandProfile = "profile"
|
const SlashCommandProfile = "profile"
|
||||||
const ProfileOptionUser = "user"
|
const ProfileOptionUser = "user"
|
||||||
|
|
||||||
const SlashCommandWishlist = "wishlist"
|
|
||||||
const SlashCommandManifesto = "manifesto"
|
const SlashCommandManifesto = "manifesto"
|
||||||
|
|
||||||
// User command names
|
// User command names
|
||||||
|
@ -50,12 +49,6 @@ func (bot *botInstance) createApplicationCommands(ctx context.Context) {
|
||||||
Name: UserCommandProfile,
|
Name: UserCommandProfile,
|
||||||
}))
|
}))
|
||||||
|
|
||||||
doOrWarn(CreateGuildApplicationCommand(ctx, CreateGuildApplicationCommandRequest{
|
|
||||||
Type: ApplicationCommandTypeChatInput,
|
|
||||||
Name: SlashCommandWishlist,
|
|
||||||
Description: "Check out the Handmade Network wishlist",
|
|
||||||
}))
|
|
||||||
|
|
||||||
doOrWarn(CreateGuildApplicationCommand(ctx, CreateGuildApplicationCommandRequest{
|
doOrWarn(CreateGuildApplicationCommand(ctx, CreateGuildApplicationCommandRequest{
|
||||||
Type: ApplicationCommandTypeChatInput,
|
Type: ApplicationCommandTypeChatInput,
|
||||||
Name: SlashCommandManifesto,
|
Name: SlashCommandManifesto,
|
||||||
|
@ -83,17 +76,6 @@ func (bot *botInstance) doInteraction(ctx context.Context, i *Interaction) {
|
||||||
bot.handleProfileCommand(ctx, i, userID)
|
bot.handleProfileCommand(ctx, i, userID)
|
||||||
case UserCommandProfile:
|
case UserCommandProfile:
|
||||||
bot.handleProfileCommand(ctx, i, i.Data.TargetID)
|
bot.handleProfileCommand(ctx, i, i.Data.TargetID)
|
||||||
case SlashCommandWishlist:
|
|
||||||
err := CreateInteractionResponse(ctx, i.ID, i.Token, InteractionResponse{
|
|
||||||
Type: InteractionCallbackTypeChannelMessageWithSource,
|
|
||||||
Data: &InteractionCallbackData{
|
|
||||||
Content: "Check out the Handmade Network wishlist at https://github.com/HandmadeNetwork/wishlist/discussions/",
|
|
||||||
Flags: FlagEphemeral,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
if err != nil {
|
|
||||||
logging.ExtractLogger(ctx).Error().Err(err).Msg("failed to send wishlist response")
|
|
||||||
}
|
|
||||||
case SlashCommandManifesto:
|
case SlashCommandManifesto:
|
||||||
err := CreateInteractionResponse(ctx, i.ID, i.Token, InteractionResponse{
|
err := CreateInteractionResponse(ctx, i.ID, i.Token, InteractionResponse{
|
||||||
Type: InteractionCallbackTypeChannelMessageWithSource,
|
Type: InteractionCallbackTypeChannelMessageWithSource,
|
||||||
|
|
Loading…
Reference in New Issue