add /version command
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 5m5s
Build and Push Docker Image / deploy-on-green (push) Successful in 6s

This commit is contained in:
2026-03-07 21:14:31 -05:00
parent aaf3338797
commit e3b5542b78

View File

@@ -53,6 +53,12 @@ func main() {
}, },
}, },
}, },
{
Name: "version",
Description: "Show application version",
DefaultMemberPermissions: &defaultMemberPermissions,
Contexts: &[]discordgo.InteractionContextType{interactionPrivateChannel},
},
{ {
Name: "download video", Name: "download video",
Type: discordgo.MessageApplicationCommand, Type: discordgo.MessageApplicationCommand,
@@ -679,6 +685,15 @@ func main() {
} }
}() }()
}, },
"version": func(s *discordgo.Session, i *discordgo.InteractionCreate) {
s.InteractionRespond(i.Interaction, &discordgo.InteractionResponse{
Type: discordgo.InteractionResponseChannelMessageWithSource,
Data: &discordgo.InteractionResponseData{
Content: "[yt-dlp-bot](https://git.dubyatp.xyz/williamp/yt-dlp-bot) by dubyatp",
Flags: discordgo.MessageFlagsEphemeral,
},
})
},
} }
s.AddHandler(func(s *discordgo.Session, i *discordgo.InteractionCreate) { s.AddHandler(func(s *discordgo.Session, i *discordgo.InteractionCreate) {