13 lines
495 B
Python
13 lines
495 B
Python
import discord
|
|
from bot import Bot
|
|
|
|
# Manager controlled by
|
|
from todos_manager import *
|
|
|
|
def setup_todos_manager_commands(bot: Bot):
|
|
@bot.client.tree.command(name="create_todo", description="Create a new todo list")
|
|
async def create_todo(interaction: discord.Interaction, todo_list_name: str):
|
|
bot.todos_manager.create_todo(interaction.user.id.__str__(), todo_list_name)
|
|
await interaction.response.send_message(f"Todo list \"{todo_list_name}\" successfully created !")
|
|
|