This script currently does not work as intended.
Due to relatively recent undocumented changes on Discord's side, features like role hoisting no longer work, and the displayed roster is capped to 100 members.
We are evaluating options to restore this functionality.
Discord is a script which allows you to integrate a custom Discord widget to your wiki for the sidebar, or for template use.
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:
| ||Number|| ID of the Discord server to be added in the sidebar|
If omitted, the rail module will not be added
| ||String||The heading inserted before the widget||Community Chat|
| ||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]|
| ||String||The text for the join button||Join Now!|
| ||String||The invite url for the join button||Taken from widget data|
| ||String||The link passed as an argument to the footer message||None|
| || ||The theme of the widget||light|
| ||String||The text for members online|| |
| ||String||The default role heading text||Users|
| ||Pages with a list of Discord user IDs grouped together||The widget's user grouping behavior||None|
| ||Role names separated by commas||The order in which user groups display. Default role is always last.||None|
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:
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
- 1.0.0-1.1.0 (2018-06-14 • code.js • code.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.js • diff.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.js • diff.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)
- I18n support
- Bug fixes