Extension:Discord

From MediaWiki.org
Jump to navigation Jump to search

Other languages:
English • ‎dansk • ‎日本語
MediaWiki extensions manual
Crystal Clear action run.svg
Discord
Release status: stable
Mw-discord.png
Implementation User interface, Notify
Description MediaWiki extension that sends notifications to Discord.
Author(s) Jayden Bailey (Jaydenkierantalk)
Latest version 1.0 (2018-12-10)
Compatibility policy master
MediaWiki 1.31+
Database changes No
License MIT License
Download
Example https://runescape.wiki
Parameters
  • $wgDiscordWebhookURL
  • $wgDiscordNoBots
  • $wgDiscordNoMinor
  • $wgDiscordNoNull
  • $wgDiscordSuppressPreviews
  • $wgDiscordDisabledHooks
  • $wgDiscordDisabledNS
Hooks used
PageContentSaveComplete
ArticleDeleteComplete
ArticleUndelete
ArticleRevisionVisibilitySet
ArticleProtectComplete
TitleMoveComplete
LocalUserCreated
BlockIpComplete
UnblockUserComplete
UserGroupsChanged
UploadComplete
FileDeleteComplete
FileUndeleteComplete
Translate the Discord extension if it is available at translatewiki.net
Check usage and version matrix.

The Discord extension sends notifications to a Discord webhook (or several) from MediaWiki. When a certain event occurs on your MediaWiki wiki, including new edits, they can be sent as a message to a channel on a Discord server using a webhook.

This extension requires cURL to be installed on your web server, which on Linux is probably as simple as running sudo apt install curl.

Live demo: https://runescape.wiki (https://discord.gg/runescapewiki)

Installation[edit]

  • Download and place the file(s) in a directory called Discord in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    wfLoadExtension( 'Discord' );
    // List webhook URLs to send notifications to (string or array containing strings)
    $wgDiscordWebhookURL = [ "" ];
    
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Configuration parameters[edit]

See README

See also[edit]