Fix quote_a config not being defaulted

This commit is contained in:
Nexus 2024-03-18 23:59:46 +00:00
parent bc16f3258c
commit b76160d57a
Signed by: nex
GPG key ID: 0FA334385D0B689F
2 changed files with 3 additions and 2 deletions

View file

@ -67,9 +67,9 @@ class QuoteQuota(commands.Cog):
):
"""Checks the quote quota for the quotes channel."""
now = discord.utils.utcnow()
oldest = now - timedelta(days=7)
oldest = now - timedelta(days=days)
await ctx.defer()
channel = self.quotes_channel
channel = self.quotes_channel or discord.utils.get(ctx.guild.text_channels, name="quotes")
if not channel:
return await ctx.respond(":x: Cannot find quotes channel.")

View file

@ -29,6 +29,7 @@ try:
CONFIG.setdefault("ollama", {})
CONFIG.setdefault("rss", {"meta": {"channel": None}})
CONFIG.setdefault("screenshot", {})
CONFIG.setdefault("quote_a", {"channel": None})
CONFIG.setdefault(
"server",
{