FANDOM


Discord is a script which allows you to integrate a custom Discord widget to your wiki for the sidebar, or for template use.

Installation

Template install

Configuration

All the configuration for the sidebar widget for the footer text, heading, join message, theme, and role separation are stored on separate pages under the MediaWiki:Custom-Discord- prefix. Only admins are allowed to edit these, so only they can customize how the sidebar widget works.

Below is a table with all the different MediaWiki pages for the sidebar, with the prefix omitted:

Option Type Affects Default
id Number ID of the Discord server to be added in the sidebar
If omitted, the rail module will not be added
None
header String The heading inserted before the widget Community Chat
footer String The text inserted next to the join button, only displayed if footer or guidelines are edited By joining, you agree to the [$1 server guidelines]
join String The text for the join button Join Now!
invite String The invite url for the join button Taken from widget data
guidelines String The link passed as an argument to the footer message None
theme dark or light The theme of the widget light
online String The text for members online <strong>$1</strong> Users Online
users String The default role heading text Users
roles-* Pages with a list of Discord user IDs grouped together The widget's user grouping behavior None
order Role names separated by commas The order in which user groups display. Default role is always last. None

Roles

You can specify different roles to separate normal users from special ones, for example, administrators, moderators, bots, etc. To do this, you have to create a page named:
MediaWiki:Custom-Discord-roles-<Role Name>

The role name can be anything that's a valid page title, so you can't use special characters like |, #, or =.

The page must then contain a list of Discord user IDs. You can fetch them by enabling Developer Mode in Discord through Settings > Appearance > Advanced, then right-clicking any user and clicking on "Copy ID". You can separate the user IDs with anything that isn't a number, and numbers that aren't user IDs will be ignored. Here are some examples of valid role user lists:

# This text is 100% ignored
155545848812535808,195712766214930432


- Admin #1 148231501413089280
- Admin #2 175267849546366976
- Admin #3 125299948001558530

Changelog

1.0.0-1.1.0 (2018-06-14 • code.jscode.css)
Initial revision
Custom Wikia rail module support
Rounded avatars for users
Chip view for usernames on hover
Wikia rail button style for join button
Wider scrollbar and custom color
1.2.0 (2018-06-30 • diff.jsdiff.css)
Template substitution
Support for pages that don't have a rail
1.3.0-1.5.0 (2018-08-30 - 2019-02-17 • diff.jsdiff.css)
Improvements and fixes to join button for consistency with the Wikia rail button style
Wiki specific changes
2.0.0 (2019-02-20 • code)
Cross wiki support
Initial Dev Wiki publish
3.0.0 (2019-02-21 • diff)
Rewrite
I18n support
Bug fixes
Text above can be found here (edit)
Community content is available under CC-BY-SA unless otherwise noted.