(tasklist): Pass context to factory.

This commit is contained in:
2022-05-11 22:04:43 +03:00
parent adbeeaa523
commit 3fbc3b1fcb
2 changed files with 3 additions and 3 deletions

View File

@@ -11,7 +11,7 @@ from .Tasklist import Tasklist
name="todo",
desc="Display and edit your personal To-Do list.",
group="Productivity",
flags=('add==', 'delete==', 'check==', 'uncheck==', 'edit==')
flags=('add==', 'delete==', 'check==', 'uncheck==', 'edit==', 'text')
)
@in_guild()
async def cmd_todo(ctx, flags):
@@ -69,7 +69,7 @@ async def cmd_todo(ctx, flags):
return
# TODO: Custom module, with pre-command hooks
tasklist = Tasklist.fetch_or_create(ctx.author, ctx.ch)
tasklist = Tasklist.fetch_or_create(ctx, flags, ctx.author, ctx.ch)
keys = {
'add': (('add', ), tasklist.parse_add),