Skip to main content
The !todo command provides a complete task management system within WhatsApp. Create, view, complete, and delete tasks easily.

Subcommands

!todo <add|list|done|delete|clear> [arguments]

Add Tasks

Create new tasks in your todo list.

Single Task

!todo add Buy groceries
Response:
✅ Todo added: Buy groceries

Multiple Tasks

Add multiple tasks at once by separating them with commas:
!todo add task1, task2, task3
Example:
!todo add Buy milk, Call dentist, Finish report
Response:
✅ Added multiple todos:
1. Buy milk
2. Call dentist
3. Finish report
From TodoHandler.ts:35-36, tasks are split by commas and trimmed:
const tasks = taskInput.split(',').map(task => task.trim()).filter(task => task.length > 0);

List Tasks

View all your current tasks with their completion status.
!todo list
Response:
📝 Todo List:
1. ○ Buy groceries
2. ✓ Call mom
3. ○ Finish documentation
symbol
Indicates an incomplete task
symbol
Indicates a completed task

Empty List

!todo list
Response:
No todos found.

Mark Tasks Complete

Mark a specific task as done using its number from the list.
!todo done <number>
Example:
!todo done 1
Response:
✅ Marked as done: Buy groceries
The task number must be valid (from your current todo list). Invalid numbers will return an error.

Delete Tasks

Permanently remove a task from your list.
!todo delete <number>
Example:
!todo delete 2
Response:
🗑️ Deleted: Call mom
From TodoHandler.ts:102, delete operations include completed tasks:
const todos3 = await TodoService.list(chat, true);

Clear Completed Tasks

Remove all completed tasks at once to clean up your list.
!todo clear
Response:
🧹 Cleared 3 completed todos.
This is useful for maintaining a clean todo list with only active tasks.

Complete Workflow

1

Add your tasks

Start by adding tasks to your list
!todo add Write docs, Review code, Deploy update
2

View your list

Check what’s on your plate
!todo list
Response:
📝 Todo List:
1. ○ Write docs
2. ○ Review code
3. ○ Deploy update
3

Complete tasks

Mark tasks as done as you finish them
!todo done 1
!todo done 2
4

Clean up

Remove completed tasks
!todo clear
Response:
🧹 Cleared 2 completed todos.

Parameters

add
subcommand
Add one or more tasks. Tasks can be separated by commas for bulk addition.Required: Task description(s)Example: !todo add Buy milk, Call dentist
list
subcommand
Display all tasks with their completion status.Arguments: NoneExample: !todo list
done
subcommand
Mark a task as completed.Required: Task number (from list)Example: !todo done 1
delete
subcommand
Permanently delete a task.Required: Task number (from list)Example: !todo delete 2
clear
subcommand
Remove all completed tasks.Arguments: NoneExample: !todo clear

Error Handling

No Subcommand

!todo
Response:
Usage: !todo <add/list/done/delete/clear> [task/number]

Invalid Subcommand

!todo edit 1
Response:
Unknown subcommand. Use: add, list, done, delete, or clear.

Missing Task Number

!todo done
Response:
Please specify the todo number to mark as done.

Invalid Task Number

!todo done 99
Response:
Invalid todo number.

No Task Content

!todo add
Response:
Please specify a task to add.

Implementation Details

Task Indexing

Tasks are displayed with 1-based indexing for user-friendliness, but stored with database IDs internally. From TodoHandler.ts:63-65:
const todoList = todos.map((todo, index) =>
    `${index + 1}. ${todo.completed ? '✓' : '○'} ${todo.task}`
).join('\n');

Batch Addition

The comma-separated batch addition feature processes each task individually (TodoHandler.ts:44-46):
const addedTasks = await Promise.all(
    tasks.map(task => TodoService.create(sender, chat, task))
);

Completion Tracking

Completed tasks remain in the list (marked with ✓) until you run !todo clear.
Todos are associated with the chat context. In direct messages with the bot, they’re private to you. In group chats, they’re shared with the group.
The current implementation doesn’t support editing. You can delete and re-add a task instead:
!todo delete 1
!todo add Updated task description
Completed tasks stay in your list (marked with ✓) until you run !todo clear. This lets you review what you’ve accomplished before cleaning up.
The current implementation doesn’t support marking tasks as incomplete. If you accidentally marked something done, you can delete it and add it again.
  • !notify - Set time-based reminders for tasks
  • !note - Save reference information related to tasks

Build docs developers (and LLMs) love