ext modules¶
These modules provide classes used by the cogs. They are primarily built around the rest of CroissantBot’s code, but they could be useful when creating a new cog.
For music¶
The queue and song modules are provided:
The
songmodule provides theSongclass, which represents a single song and stores its info.The
queuemodule provides theQueueclass, which implements a queue that deals withSonginstances.
For PostgreSQL databases¶
The db module is provided. It provides two classes:
A base class (
DatabaseConnection) which can connect and disconnect from a database, and check whether it is currently connected.A class (
MusicDatabaseConnection) to manage the music database used by the Playlist cog.