-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or request
Description
While restructuring the way the pug categories were stored I also made a class for interacting with the bot's database, without needing the 20+ functions that were specific to one purpose in database.py. Having every feature that uses the database use the BotCollection class instead would look and work much better
from database import BotCollection
category_db = BotCollection("guilds", "categories")
# Get a list of pug categories
try:
result = await category_db.find_item({"_id": interaction.guild.id})
except LookupError:
await interaction.send(
"There are no pug categories setup for this server.\nPlease run /pug category add to add a pug category."
)
returnMetadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request