if event=="CHAT_MSG_WHISPER" and message and aura_env then
if not aura_env.last or aura_env.last < GetTime() - 1 then
aura_env.last = GetTime()
message=string.lower(message)
sender=Ambiguate(sender,"short")
local needle = nil
for _,row in pairs(aura_env.config.MessageKeys) do
if not needle and row.enabled then
needle = message:match("%f[%p%w]"..string.lower(row.keyword).."%f[%W]")
if needle then
SendChatMessage(row.message, "WHISPER", "COMMON", sender)
end
end
end
end
end
end```
Looking to add a delay of 2ish seconds to this weak aura that auto replies instantly
#Adding delay to auto reply weak aura
12 messages · Page 1 of 1 (latest)
I deleted your crosspost for you.
Delay 2 sec? Replace SendChatMessage(row.message, "WHISPER", "COMMON", sender) with:
C_Timer.After(2, function()
SendChatMessage(row.message, "WHISPER", "COMMON", sender)
end)
look at snippets in custom code input screen there is a snippet for basic throttle
unless you want a 2 sec delay on the reply
I thought the same but there's already a throttle.
I didn't even look at the code tbh
The thing that's perhaps actually wanted is for messages to come in unthrottled but go out at a limited rate. That would be more complex. You'd table up the entries as they come in and throttle the outgoings, with a C_Timer and ScanEvent to refire.
possibly. does blizz throttle your reply speed?
It does, but messages are lost, not queued.
sorry, i should have cleaned it up myself. someone dm'd me and pointed me in the right direction
Ill try this out thanks!