The repository is dense and I’m not sure if I’m doing this correctly. I want to try to create a second slash command by modifying the NewCommandHandler function in /server/command/command.go and calling client.SlashCommand.Register. Is that the correct way to do so ?
I’ve tried comparing it against the Github plugin and it looks like they’re doing it another way.
Moreover, is there any step-by-step guide or tutorial that walks you through the development of a plugin ?
Hi Alden! First off, welcome to the Mattermost forums! Second, it’s great to hear you’re diving into plugin development! For adding a second slash command, I think modifying the NewCommandHandler function is a valid approach, but you might also explore how commands are registered in other plugins to see alternative patterns.
To help you get started, check out our detailed Plugin Developer Guide for a step-by-step walkthrough and best practices. Happy coding!
Thanks for your answers. Regarding the Plugin Developer Guide, I feel like it’s more about setting up one’s environment than really diving into how to develop a new plugin (I feel like the deprecated Apps Framework did a better job explaining how to develop a new integration).
I did try to asking the community Developers channel but I did not have any answer.
Best,