fix chart generation

This commit is contained in:
yuki 2025-10-08 23:06:12 -03:00
parent 48e6a4442a
commit 13852f59d3

View file

@ -8,7 +8,7 @@ import utils as u
# from catbox_async_uploader.catbox_async_uploader.enums import LitterboxDuration
# from pyzxz import ZeroXZero
async def create_chart(ctx: nerimity.Context, entity: str, size: str = "3x3", timeframe: str = "7day", username: str = None):
async def create_chart(bot: bot.Bot, ctx: nerimity.Context, entity: str, size: str = "3x3", timeframe: str = "7day", username: str = None):
temp_msg = None
if 'x' not in size:
@ -97,6 +97,7 @@ def setup(bot: bot.Bot):
@bot.slash_command(name="chartalbum", description="Generate an album collage.")
async def chartalbum(ctx: nerimity.Context, size: str = "3x3", timeframe: str = "7day", username: str = None):
await create_chart(
bot = bot,
ctx = ctx,
entity = "album",
size = size,
@ -108,6 +109,7 @@ def setup(bot: bot.Bot):
@bot.slash_command(name="chartartist", description="Generate an artist collage.")
async def chartartist(ctx: nerimity.Context, size: str = "3x3", timeframe: str = "7day", username: str = None):
await create_chart(
bot = bot,
ctx = ctx,
entity = "artist",
size = size,