add /version command
This commit is contained in:
15
app/main.go
15
app/main.go
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user