Talk:DiscordIntegrator

Instructions
Can someone please simplify how to add this? It's very confusing, especially with where you should put each piece of code and what you should put in. (dev:DiscordIntegrator/code.js vs the importArticles thing). --Squirrel719 (talk) 09:00, August 3, 2016 (UTC)
 * You can either import the script through the importArticles function in Common.js (which will require the edit to be "verified"), or you can just add an import into the ImportJS page and bypass verification.
 * After that, you can either copy the template, or simply use the configuration option (which would require editing common.js and having the edit "verified"). Sajuuk 10:26, August 3, 2016 (UTC)

Load order
The script does not load the sidebar module in a consistent place - if the sidebar loads slightly slower than normal then it will be the first module in the sidebar rather than the last. Is it possible to fix this to be consistent? ~ Ursuul 07:39, February 8, 2017 (UTC)
 * Yes, that is possible. -452 13:22, November 24, 2016 (UTC)
 * Could someone more knowledgeable perhaps...do something then? Since the issue persists.
 * I updated it a few weeks ago, it should load below ads and content review module and above all other Rail contents. -- Cube - shaped   garbage can  07:41, February 8, 2017 (UTC)

It seems not to have worked On this Wiki & others. ~ Ursuul 08:28, February 8, 2017 (UTC) ~ Ursuul 08:35, February 8, 2017 (UTC)
 * That's exactly what's supposed to happen. -- Cube - shaped   garbage can  08:30, February 8, 2017 (UTC)
 * Oh, my bad. Is there an older version that makes it always load below all rail contents? It’s a rather low-priority module for me, especially when AddRailModule is used alongside it.
 * Try using


 * -- Cube - shaped   garbage can  08:43, February 8, 2017 (UTC)

Perfect! Thanks so much! ~ Ursuul 08:58, February 8, 2017 (UTC)

Issues that it causes for two other scripts
I imported the script through ImportJS but soon removed it because I discovered that it caused problems for two other JavaScripts that I use - Talk Button and Quick Image License (the latter doesn't have it's own page). It caused those two scripts to display twice instead of once each. ― C.Syde  ( talk  |  contribs ) 10:45, December 8, 2016 (UTC)

LoggedIn parameter issue
So a few days ago, the Discord widget on our wiki's front page started displaying the unregistered user message even if you're logged in; looking at the revision history of the script, I assumed this was something to do with the most recent edits and simply waited for the latest revision to get passed, though it appears as though I assumed wrong. I can't tell if this is an isolated incident or an actual bug with the script, so a response would be appreciated in order to clear that up.

Thanks,

~PlasmoidThunder 14:35, January 27, 2017 (UTC) ~PlasmoidThunder 15:16, January 27, 2017 (UTC) ~PlasmoidThunder 19:56, January 27, 2017 (UTC) ~PlasmoidThunder 15:12, January 28, 2017 (UTC) ~PlasmoidThunder 21:56, January 30, 2017 (UTC)
 * That was a bug which I fixed, it got approved about two or three days ago. The widget is displaying normally for me on that front page, can you try clearing your cache? -- Cube - shaped   garbage can  15:01, January 27, 2017 (UTC)
 * Tried clearing the cache and cookies, null editing the page, and restarting the browser, but I still get that message.
 * Awkward, I can't reproduce the issue. Is somebody else facing that issue too? Which browser/OS are you using? -- Cube - shaped   garbage can  15:27, January 27, 2017 (UTC)
 * A few people in the wiki's chat are seeing the same issue. I'm using Google Chrome, though I can't vouch for everyone else.
 * Hey there, I had the same issue as well on We Bare Bears wiki with G.Chrome last week but things seems to be fixed after I remove the script import from MediaWiki:ImportJS and then re-adding the script again, you can try that and hopefully that helps, cheers. 𝒮𝓉𝒶𝓇  𝓂𝒶𝓃   𝒲  13:40, January 28, 2017 (UTC)
 * We have it in our Common.js, but I'll give that a try and see if anything happens.
 * That seemed to do the trick, thanks.

The script doesn't work
I tried to install this script on this wiki, I set up server settings, but the script doesn't work. -- Шпик (обс.) 16:00, March 9, 2017 (UTC)
 * Your Common.js is throwing an error on the  part. Try wrapping that part of your code like


 * -- Cube - shaped   garbage can  16:17, March 9, 2017 (UTC)

Making the Module Appear for Users Not Logged In
Is there any way to make the module appear for users not logged into Fandom? It used to appear regardless iirc and it was helpful for drawing in new people who were on the fence about starting to edit. Roranoa Drake II (talk)
 * It's because it's attempting to load  module which doesn't load for anons. I'm aware of the bug, I just didn't get the time to fix this issue yet. It used to appear for anons back when it didn't need to query the API and took the values from JavaScript configuration. --  Cube - shaped   garbage can  20:09, April 7, 2017 (UTC)
 * I forgot to note, this is fixed in the latest update. -- Cube - shaped   garbage can  21:54, June 21, 2017 (UTC)

Empty Space Below Widget
What's up with the empty space below the widget? Is this something that can't be customized? DEmersonJMFM 20:20, April 8, 2017 (UTC)
 * I noticed that as well. You can customize the module's height, though, so configuring it to a correct amount should fix it. -- Cube - shaped   garbage can  20:22, April 8, 2017 (UTC)
 * Tried that. It just reduces the space proportionally to the size of the module. DEmersonJMFM 20:31, April 8, 2017 (UTC)
 * Oh. Can you try using


 * in your wiki's CSS? -- Cube - shaped   garbage can  20:35, April 8, 2017 (UTC)
 * Worked great (I used 98%). Would like to style the text next to Connect (to be readable), but unfortunately it's in the iframe. DEmersonJMFM 20:57, April 8, 2017 (UTC)

Show Nicknames
I've used Discord for a while for gaming, but just added it to my Wikia site. A neat feature that Discord has is Nicknames, where you can change your display name dependent on the server. I've changed my Nickname for the server relating to my Wikia page to match my Wikia username, but the Widget on my page still displays my original Discord username.

I googled about and saw that some coders who'd created their own Discord widgets were able to add a showNickname boolean parameter - is that something that can be done here, or does it have to be handled over at Discord themselves?

Haldarn (talk) 10:58, May 6, 2017 (UTC)

Removing Border?
I want to remove the "box" on my wiki to fit in with the rest of the interface, but i dont know how.

I imported it before the new wiki siderail design was introduced. Searingjet (talk) 15:05, May 9, 2017 (UTC)
 * There shouldn't be a border on the DiscordIntegrator module, I updated it to the new design a few weeks ago. Which wiki are you referring to? -- Cube - shaped   garbage can  15:14, May 9, 2017 (UTC)

Moving module under other ones
I need to move DiscordIntegrator module under other modules. Can you add a option (default "false") or sead a code which can do that? Pirr (talk) 21:49, June 21, 2017 (UTC)
 * I'm pretty sure you can use the code I provided in section, but modifying it to append it below a module instead of below the whole rail. --  Cube - shaped   garbage can  21:53, June 21, 2017 (UTC)

Double widget
Hey, we've got two widgets on our siderail at the Elder Scrolls Sandbox, instead of just one. All we did was import the code from here and changed the server ID to the appropriate one. Does anyone know what could have caused this? 21:58, July 16, 2017 (UTC)
 * You imported DiscordIntegrator twice. Remove the import from your MediaWiki:Common.js page. -- Cube - shaped   garbage can  22:22, July 16, 2017 (UTC)

Disabling script.
Is there any chance you could add something like to allow users to add to their personal js files do disable this script? My community is using it side wide, but I really don't want to see it. -- 13:40, August 14, 2017 (UTC)


 * For now this works:


 * But if the script had double run protection, that variable could be set as  instead. • speedy • 🔔&#xFE0E; • 🚀&#xFE0E; • 13:56, August 14, 2017 (UTC)
 * EDIT: Maybe use  too. :p
 * Thanks, that worked. Yeah, definitely. Double-run protection should be a feature already for a script of this purpose. — 20:00, August 14, 2017 (UTC)
 * In the next update you should be able to use  to prevent the iframe from loading completely. This, however, will also disable the in-content widgets for you. --  Cube - shaped   garbage can  11:58, August 27, 2017 (UTC)

Preview Shows Error
So I drove myself nuts to finally realise I had done everything correctly, but when you preview a page that has the template on it, it will give you the "If you see this, your JavaScript might be disabled or DiscordIntegrator plugin isn't working. If the latter, please contact a wiki administrator." error. It isn't until you publish that the widget will show- this happened on both my wiki and trying it out on the dev wiki. Is this already written in somewhere that I missed? Is it even supposed to do this? Bluesonic1 (talk) 05:14, October 29, 2017 (UTC)


 * That, while perhaps not intended, is normal; JS doesn’t usually fire in Preview. You will have to save the page each time you rely on JavaScript in order to see how it will look.
 * I modified the script now so it should work in preview after it gets approved. -- Cube - shaped   garbage can  07:18, October 29, 2017 (UTC)

Rail Compatibility
I was given the following script to ensure that the Discord Module stays at the bottom of the rail: However, it causes this to happen: Is there a way to stop that overlap from occurring, a way to make the Module always be directly above the TFA Module / Advertisement? This issue also occurs with AddRailModule, & a fix for that would be greatly appreciated.
 * I have a personal use method for that. It is called Anti-TFAFloat, which makes that TFA module stop from floating. ~Signed JustLeafy ( ͡| ͜' ͡| ) USER  WALL  20:31, November 21, 2017 (UTC)

Remove/Hide channel name?
How do I remove/hide channel name on widget? MakBash (talk) 08:44, November 27, 2017 (UTC)

We are currently trying to include our discord server to this wikia, and everything works fine, until I wanted to add the server to my sandbox to try it out and to the sidebar, where it suddenly doesn't work.

~ Lava 20:11, December 28, 2017 (UTC)