Thread Tools Display Modes
Prev Previous Post   Next Post Next
04-08-10, 10:58 AM   #1
upyursh
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 32
Which slash command was run

What I would like is to be able to have multiple slash commands registered in my addon but then be able to identify which one was executed.

Code:
Addon:RegisterChatCommand( "slasha" , "SlashFunction" )
Addon:RegisterChatCommand( "slashb" , "SlashFunction" )
then when in my SlashFunction function id like to be able to do something like;

Code:
function ProEmote:SlashFunction()

	local slash = MySlash()
        print("You typed " .. slash);
	
end
I know i could use inputs instead and have a single slash command but i'd like it this way if possible

Any ideas how to know what the slash command was that was typed?

Upy
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » Which slash command was run


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off