How to Set Up My YAGPDB Custom Commands Suite in a Discord Server
Channel: Vladlena Costescu
Date: 2020-09-21

I have been writing a number of custom commands for the YAGPDB Discord bot for a few months now, initially for my own use in the Discord server that I run. However, I have been posting my commands on my GitHub with public visibility and open source licensing so that I can share them with others who might want to do some of the same things in their servers that I've been doing in my server.

The bot is written in Go and hence the custom commands engine that the bot creator provides also uses Go, albeit a small subset of the language; specifically, a subset of the functionality made available by the templating engine and the text package.

The video shows the "bootstrapping" process for my suite of custom commands, because the manner in which the commands were written demands that the bot's database be set up in a particular way. This was done for the purpose of code reusability, so that I can store commonly used values in the database and refer to them as needed rather than copy-paste the same values all over the place. In programming there is a principle called "DRY" or "Don't Repeat Yourself", which I think is highly useful as a guideline for development and hence try to use it in my own code as much as possible.

Aside from setting up some of the most commonly used database values, I also show how to get the channel link and message link commands set up, since those are the two most highly requested custom commands that I have written. Perhaps in the future I will talk about my other commands as well, but this is a good start towards that end. Any future videos would assume that the bootstrapping process was already done and hence not need to dwell on that topic to any significant extent.

Links:
- YAGPDB website: https://yagpdb.xyz/
- YAGPDB documentation: https://docs.yagpdb.xyz/
- My GitHub repository for YAGPDB custom commands: https://github.com/lbds137/yagpdb-custom-commands