Args always null moderation pubsub?


From what I remember I was able to get the reason of a ban / unban and the name of the person that got unbanned using the moderation pubsub.

However it seems that now it’s always returning null on ban/unban only, not on timeout.

Are there any explanations or things I missed ?

I’m getting null only for unban & untimeout, ban and timeout I still get the name.

Indeed I do get the name on bans but I can’t get the reason, and unban has literally nothing left.

I guess we’ll have to wait @xangold 's answer

1 Like

I just received the Twitch Developer Forums summary mail and read this topic. Funny because i have the same issue and currently trying to fix the null reference exception in my .NET app right now. :slight_smile: Maybe someone give me a hint to fix. I deserialize the json string into an own class with explicit string array for the args. How to check the array is null/nothing? Is nothing, ubound, length? Btw. I’m getting the unbanned username through API and target_user_id.

@Namania86 A simple google search should answer all of your questions about arrays in .NET

And the thing is that we used to be able to get usernames without having to do API requests and the most important thing is that the reasons disappeared.

I’m wondering if we’re ever gonna get an answer from twitch staff on this topic as we don’t even know if it’s intentional from twitch to remove those informations from the pubsub or if it’s a bug.


As the new API is out and this topic is 15 days old and this problem still hasn’t been fixed. I was wondering if it would get a fix or at least someone looking into it ? @DallasNChains @xangold


Has anyone heard any updates about this yet? Multiple people I know have poked staff about it without any response whatsoever, but it still seems broken; or is this new, intended behaviour? :roll_eyes:


Still nothing it seems, can’t see who unbans.


Sorry for the delay in response. Should be fixed shortly.

example timeout

{"data":{"type":"chat_login_moderation","moderation_action":"timeout","args":["xantest419","600","this is a test reason"],"created_by":"xangold","created_by_user_id":"39141793","msg_id":"","target_user_id":"94847705"}}

example ban

{"data":{"type":"chat_login_moderation","moderation_action":"ban","args":["xantest419","this is a test reason"],"created_by":"xangold","created_by_user_id":"39141793","msg_id":"","target_user_id":"94847705"}}

example unban


If that does not look correct, please reply ASAP.

1 Like

Looks correct to me. One thing I noticed: /untimeout also sends a “moderation_action”: “unban”.
not sure if that is related in any manner, but might be worth fixing while at it.

It doesn’t make a difference whether it’s /untimeout or /unban, does it?

It just seemed weird, especially since there is a functional difference between the two, but again, not super important or critical in any way.

The only functional difference, as far as I know, is that /untimeout can’t be used when the target is /banned. When triggerable, has the same effect as /unban.

Well thanks for the fix everything seems to work as intended !

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.