Help debugging a weakaura / lua script

Hi there, I run two accounts and I made a weakaura that triggers on LFG_PROPOSAL_SHOW to message my bnet account so I know when the queue has popped.

It was working prior to TWW releasing, and it still sends a message, but my other account does not receive the message.

This is what I have:

function()
    acc = C_BattleNet.GetAccountInfoByID(select(3, BNGetInfo()))
    BNSendWhisper((acc.bnetAccountID), "The dungeon queue has popped up!")
end

Here is a screenshot of my weakaura settings:

https://i.imgur.com/AbqIDG2.png

Any idea why the message sends, but is not received on the other account as a whisper?

Thanks!

wrap them in code tags :wink:

BNGetInfo

https://warcraft.wiki.gg/wiki/API_BNGetInfo

returns the information for the current account so it would seem the message is being sent to itself (the sending account).

For another accounts it seems you would need to use

https://warcraft.wiki.gg/wiki/API_C_BattleNet.GetFriendAccountInfo

to get the id of the other account.

1 Like

Like I mentioned in the first post, the message does send to myself on the sending account, but the other account does not receive the message where it previously did. I am using BNGetInfo.

I queue on Account#1, LFG_PROPOSAL_SHOW triggers and sends the message to my Bnet account which is visible on Account#1 as a whisper. Account#2 is online but does not receive a bnet whisper from myself (both accounts can receive bnet whispers from others)

If the articles are to be believed you’re attempting to whisper yourself (not the 2nd account) which isn’t a thing the game lets you do.

https://warcraft.wiki.gg/wiki/API_BNSendWhisper

The sender gets a “mirrored response” which is what you are seeing on account 1. Because you are sending to yourself (account 1), why would account 2 get the message?

Prior to TWW, it was possible to whisper my own BNET account and have the whisper show on both online accounts. I can still whisper my bnet account. A friend and I used this weakaura pretty often as we both have multiple accounts and do things on the account that isnt in queue while waiting.

My BNET account is Dubious#xxxx. Here’s a screenshot of my paladin who isnt named Dubious receiving the tell when the weakaura is triggered:

https://i.imgur.com/YwstlyS.png

The message is being sent, and if I just type “/whisper Dubious XXXX”, it also works. See the next screenshot:

https://i.imgur.com/MqMs2gR.png

I’ve changed the blue bnet whisper text to pink/purple so thats why it shows in that color.

https://i.imgur.com/iF22tha.png

Both accounts are under the same BNET account. When someone messages me over BNET (that isnt myself), both online accounts receive the message.

Dubious#xxxx

  • Account #1
  • Account #2

Maybe try:

BNSendWhisper(BNet_GetBNetIDAccount("Dubious"), "The dungeon queue has popped up!")

BNet_GetBNetIDAccount is what Blizz. uses which seems to return something different to acc.bnetAccountID. Other than that I’m at a loss.

I have some revised code to test whether the message was sending or failing to send.

function ()
local _, battleTag, accountID = BNGetInfo()

-- Check if the battleTag and accountID were retrieved successfully
if battleTag and accountID then
    print("Sending message to BattleTag:", battleTag)
    
    -- Get detailed account information
    local acc = C_BattleNet.GetAccountInfoByID(accountID)
    
    if acc then
        -- Use the account ID to send the message
        local isMessageSent = BNSendWhisper(acc.bnetAccountID, "The dungeon queue has popped up!")
        if not isMessageSent then
            print("Failed to send message to:", battleTag)
        else
            print("Message sent successfully to:", battleTag)
        end
    else
        print("Failed to retrieve account info for ID:", accountID)
    end
else
    print("Could not retrieve BattleTag or account ID.")
end
end

With this, I get the mirrored response, but it is not sending to the other account. This worked previously, and I have no idea why it stopped :frowning: