From 1eebb54ac827e57a1c75ddf4c0819ab9e2bce123 Mon Sep 17 00:00:00 2001 From: AssisrMatheus Date: Tue, 17 Sep 2019 22:05:01 -0300 Subject: [PATCH] :sparkles: Added the possibility to add an item via chat command --- TodoChecklister.toc | 2 +- chat.lua | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/TodoChecklister.toc b/TodoChecklister.toc index 6e718aa..9bf8968 100644 --- a/TodoChecklister.toc +++ b/TodoChecklister.toc @@ -2,7 +2,7 @@ ## Title: TodoChecklister ## Author: Matheus Assis Rios (github.com/AssisrMatheus) ## Notes: I have bad memory so I made this. A todolist/checklist AddOn for World of Warcraft. -## Version: 1.1.3 +## Version: 1.1.4 ## DefaultState: enabled ## SavedVariables: TodoChecklisterDB, TodoChecklisterMapIcon diff --git a/chat.lua b/chat.lua index c672a5c..27d9a27 100644 --- a/chat.lua +++ b/chat.lua @@ -16,11 +16,16 @@ Chat.commands = { ["tg"] = function() core.TodoChecklisterFrame:Toggle() end, + + ["add"] = function(...) + core.TodoChecklisterFrame:AddItem(tostringall(...)) + end, ["help"] = function() print(" "); Chat:Print("List of slash commands:") - Chat:Print("|cff00cc66/todo tg|r - Toggle todo window"); + Chat:Print("|cff00cc66/todo tg|r - Toggle todo window"); + Chat:Print("|cff00cc66/todo add|r {message} - Adds a message from chat"); print(" "); end,