I am working to port a Discord bot to Go, and I noticed this potential issue.
While building out my slash command data, I noticed that ApplicationCommand is the only struct that takes {Name/Description}Localizations as a pointer. This makes life a little harder as I have a function building this for me. I found this comment on the localization PR: https://github.com/bwmarrin/discordgo/pull/1143#discussion_r1156460628
My question is the same as the one above: Why does ApplicationCommand take a pointer while ApplicationCommandOption and ApplicationCommandOptionChoice doesn't?
My current code with the required workaround (assigning a variable):
I am working to port a Discord bot to Go, and I noticed this potential issue.
While building out my slash command data, I noticed that
ApplicationCommand
is the only struct that takes{Name/Description}Localizations
as a pointer. This makes life a little harder as I have a function building this for me. I found this comment on the localization PR: https://github.com/bwmarrin/discordgo/pull/1143#discussion_r1156460628My question is the same as the one above: Why does
ApplicationCommand
take a pointer whileApplicationCommandOption
andApplicationCommandOptionChoice
doesn't?My current code with the required workaround (assigning a variable):
Disclaimer: I am very new to Go. I would appreciate the help :)