You can use this code as a foundation for more advanced discord bot functionality. It is a good starting point eliminating all needed boilerplate to create a discord bot
If you want to learn how to create a discord bot like this, check out my article here!
If you would like a cli function which creates this automatically, check out this repo!