Disable/Enable Chat Macro

I’m looking for a command that does what the in-game toggle does. Nothing else. Do not want addons for this.

Is this something that exists? Surely if a toggle exists, so does a command…

Doesn’t look like it’s CVar controlled
https://github.com/Gethe/wow-ui-source/blob/live/Interface/AddOns/Blizzard_SettingsDefinitions_Frame/Social.lua

1 Like

Menu - Options - Social - Topmost option “Disable Chat”.

I’ve found this also stops the nasty tells.

Edit: Context - Shuffle is toxic. Period. I want to hit a macro, stop chat during my queue session, then re-enable for social stuff with guild/friends/llama.

Edit 2: I have no idea what that link takes me to. Code? Not my forte.

Try this

/run if C_SocialRestrictions.IsChatDisabled() then C_SocialRestrictions.SetChatDisabled(false) else C_SocialRestrictions.SetChatDisabled(true) end
2 Likes

To confirm, the functionality of that script allows chat enable/disable at the press of a button? I’m seeing the arguments, but again - not a coder. I do the scrum leading.

That’s the goal. Haven’t tested it though and it likely won’t update the checkbox in the settings interface (till you reloadui).

1 Like

Alright, testing. Bear with me while I pray my UI doesnt break.

You can add a confirmation into Elvenbane’s macro

/run local disable = not C_SocialRestrictions.IsChatDisabled() C_SocialRestrictions.SetChatDisabled(disable) ChatConfigFrame_OnChatDisabledChanged(disable) print(format("Chat: %s", disable and "Disabled" or "Enabled"))

It will also sync. the checkbox.

3 Likes

Confirmed. This does work as long as I include a reload.

Edit: @Fizzlemizz - This works even better! And I confirmed that the report for Enabled/Disabled is consistent with the toggle in the options menu. Thank you guys for all the help on this!

Edit 2: In case, for whatever reason, this is lost -

/run local disable = not C_SocialRestrictions.IsChatDisabled() C_SocialRestrictions.SetChatDisabled(disable) ChatConfigFrame_OnChatDisabledChanged(disable) print(format("Chat: %s", disable and "Disabled" or "Enabled"))

A perfect built-in reply for whispers:

“Your message got FizzledTM and was not received”.

1 Like