Discord (gadget)

From Support Wiki
Jump to navigation Jump to search

This gadget adds a small Discord banner linking to the wiki's Discord server and showing its number of online users to the wiki.gg header.

Use

This is an approved gadget under our Customization Policy. The gadget can be seen in use on the Undertale Yellow Wiki. Privacy browser extensions that block social media links or trackers can cause some issues to where the gadget won't display properly. To fix this, please have users disable privacy extensions for your wiki.

Installation instructions

  1. You need to be a local/community admin on your wiki to follow these steps, since it involves editing pages in the MediaWiki namespace. You also need to be an admin of the Discord server whose widget you want to display.
  2. Go to your Discord server's Server Settings, select the Widget section and enable the widget for your server. Save the server ID from that screen for later use.
  3. Copy the contents of the gadget's scripts to your wiki's MediaWiki:Gadget-discord.js page.
  4. Copy the contents of the gadget's styles to your wiki's MediaWiki:Gadget-discord.css page.
  5. Change the serverId variable to the server ID of your server, which you have previously copied from the Widget section.
  6. Change the inviteLink variable to an invite link to your server (in the format of https://discord.gg/serverInvite). Make sure it is a non-expiring invite.
  7. On the MediaWiki:Gadgets-definition page of your wiki, add the line:
    * Discord[ResourceLoader|default|dependencies=mediawiki.util]|discord.js|discord.css