fix chart generation
This commit is contained in:
parent
48e6a4442a
commit
13852f59d3
1 changed files with 3 additions and 1 deletions
|
|
@ -8,7 +8,7 @@ import utils as u
|
||||||
# from catbox_async_uploader.catbox_async_uploader.enums import LitterboxDuration
|
# from catbox_async_uploader.catbox_async_uploader.enums import LitterboxDuration
|
||||||
# from pyzxz import ZeroXZero
|
# 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
|
temp_msg = None
|
||||||
|
|
||||||
if 'x' not in size:
|
if 'x' not in size:
|
||||||
|
|
@ -97,6 +97,7 @@ def setup(bot: bot.Bot):
|
||||||
@bot.slash_command(name="chartalbum", description="Generate an album collage.")
|
@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):
|
async def chartalbum(ctx: nerimity.Context, size: str = "3x3", timeframe: str = "7day", username: str = None):
|
||||||
await create_chart(
|
await create_chart(
|
||||||
|
bot = bot,
|
||||||
ctx = ctx,
|
ctx = ctx,
|
||||||
entity = "album",
|
entity = "album",
|
||||||
size = size,
|
size = size,
|
||||||
|
|
@ -108,6 +109,7 @@ def setup(bot: bot.Bot):
|
||||||
@bot.slash_command(name="chartartist", description="Generate an artist collage.")
|
@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):
|
async def chartartist(ctx: nerimity.Context, size: str = "3x3", timeframe: str = "7day", username: str = None):
|
||||||
await create_chart(
|
await create_chart(
|
||||||
|
bot = bot,
|
||||||
ctx = ctx,
|
ctx = ctx,
|
||||||
entity = "artist",
|
entity = "artist",
|
||||||
size = size,
|
size = size,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue