For a gaming community we are using discord, together with costumeboxes we are adding it to the sidebar.
I can not see anything wrong with the current script.
Code on Github https://github.com/RestingCoder/discord-widget
To be more precise
the "div.dialogContainer" from change style does not want to load whit this script running on the page.