I’ve been working with extra slash commands for a little bit now, and most work beautifully; except for 2.
One is:
SlashCmdList[“FS”] = function()
FrameStack() end
SLASH_FS1 = “/fs”
I assume this one doesn’t work because framestack is probably a protected function, and the only reason for fs is it’s quicker than fstack.
The other, though, is:
SlashCmdList[“LEAVEBATTLE”] = function()
SendChatMessage(“Good match, have a good day y’all!”,“Instance”)
LeaveBattlefield() end
SLASH_LEAVEBATTLE1 = ‘/LB’
Which spits out this issue in BugSack:
1x SendChatMessage(): Unknown chat type
[C]: ?
[C]: in function SendChatMessage' MinimalUI\Commands.lua:53: in function
?’
FrameXML\ChatFrame.lua:4757: in function ChatEdit_ParseText' FrameXML\ChatFrame.lua:4418: in function
ChatEdit_SendText’
FrameXML\ChatFrame.lua:4454: in function `ChatEdit_OnEnterPressed’
[string “:OnEnterPressed"]:1: in function <[string ":OnEnterPressed”]:1>
Locals:
(*temporary) = “Good match, have a good day y’all!”
(*temporary) = “Instance”
I’m not certain if it doesn’t work because it either
A) Can’t find instance chat
B) Wont to parse existance outside of instances
C) Instance is the wrong channel for this
I have one similar for raids/groups, and that works just fine! But this one is a bit buggy
- There’s already a shortened version /fstack
- It’s
"INSTANCE_CHAT"
not "Instance"
You could also take a page from Macro-Talk and make it automatically determine the group channel.
local channel =
IsInGroup(LE_PARTY_CATEGORY_INSTANCE) and "INSTANCE_CHAT" or
IsInRaid() and "RAID" or
IsInGroup() and "PARTY"
1 Like
Thank you! I have one specifically for PVP, which is the one noted in the OP, and one for PVE. The PVE one, I’m not sure how I would go about making it automatically determine group channel.
Currently, it’s
SlashCmdList[“LEAVEGROUP”] = function()
SendChatMessage(“Thanks for the group!”,“RAID”)
LeaveParty() end
SLASH_LEAVEGROUP1 = ‘/LG’
I’m not sure if it leaves instances > parties, but I’ll have a look in a little bit. But if I were to make it automatically determine, would it be something like
SlashCmdList[“LEAVEGROUP”] = function()
local channel =
IsInGroup(LE_PARTY_CATEGORY_INSTANCE) and “INSTANCE_CHAT” or
IsInRaid() and “RAID” or
IsInGroup() and “PARTY”
SendChatMessage(“Thanks for the group!”)
LeaveParty() end
SLASH_LEAVEGROUP1 = ‘/LG’
Or would I need to throw something to onto the SendChatMessage bit to make it call which ever one? For instance,
SendChatMessage("Thanks for the group!","channel")
Without the quotes around channel
SendChatMessage("Thanks for the group!",channel)
1 Like