Create Slash Commands - WoWInterface
Thread Tools Display Modes
Prev Previous Post   Next Post Next
08-05-17, 07:20 AM   #1
A Murloc Raider
Join Date: Aug 2017
Posts: 5
Create Slash Commands

Hi!, im new in Addon's development, and I'm having problems with the next Slash commands that I want to create, my idea is simple I just want to shortcuts, some personalize phrases , this is the code:
And btw, i don't know exactly what means the "msg" or "(txt)" does with "function " , and how does it affect the script


SlashCmdList ["PHRASE"] = function (msg)
SendChatMessage ("Go to RBG!", GUILD")

SlashCmdList["SPHRASE"] = function (msg)
SendChatMessage("Do you want come with us to RBG?", "SAY")

Ok, the First /ph, works for the guild, but "SAY" is not working, and I have no clue.

Q1: if I write "function ()" what it does?
Q2: Could I use {} to just write 1 code line "SlashCmdList?

-- sry for my English --
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Create Slash Commands

Thread Tools
Display Modes

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