michaelhillebrand / huskiebot

A multipurpose discord bot
GNU General Public License v3.0
4 stars 0 forks source link

Enhance: switch to using cogs #18

Closed willpoorman closed 5 years ago

willpoorman commented 5 years ago

Discord.py offers a Bot and a Commands extension class to help abstract away the common parts of creating most Discord bots. It provides positional parameters, before and after hooks, subcommands, etc. Plus Bot inherits from Client, so it does everything Client does too. It also offers the Cogs class to help set up groups of related commands and tasks and provide a programmatic way to import, enable, and disable them.

This PR ports all of the existing commands and tasks over to use the Bot, Commands, and Cogs system, plus adds a few example commands as well. A majority of them I ported over and then changed to better utilize some of these built-in features. But others I only did the minimum to get ported over and will leave those as an exercise for the other committers to improve, to become familiar with this new system.