All Projects → jayktaylor → mw-discord

jayktaylor / mw-discord

Licence: MIT License
📝 MediaWiki extension that sends notifications to Discord, used on https://runescape.wiki.

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to mw-discord

stack-exchange-notifications
Add-ons for Stack Exchange sites, like: askdifferent, askubuntu, serverfault, stackoverflow and superuser
Stars: ✭ 21 (+31.25%)
Mutual labels:  notifications, extension
mediawiki-antispam
Antispam extension for MediaWiki.
Stars: ✭ 15 (-6.25%)
Mutual labels:  extension, mediawiki
millennials-to-snake-people
🐍 Chrome extension that replaces occurrences of 'Millennials' with 'Snake People'
Stars: ✭ 187 (+1068.75%)
Mutual labels:  extension
PlayniteVndb
Enables VNDB as a Metadata source for Playnite
Stars: ✭ 47 (+193.75%)
Mutual labels:  extension
pass-fzf
Fuzzy finder for pass
Stars: ✭ 20 (+25%)
Mutual labels:  extension
hstore-extension
The encoder/decoder and set of the doctrine functions for the postgresql type `hstore`
Stars: ✭ 14 (-12.5%)
Mutual labels:  extension
mw2fcitx
Fcitx 5 pinyin dictionary generator for MediaWiki instances. (Releases for demo dict of zh.moegirl.org.cn)
Stars: ✭ 80 (+400%)
Mutual labels:  mediawiki
twilio-voice-notification-app
Reference app built in ReactJS that demonstrates how to leverage Twilio Programmable Voice and Twilio SDKs to create a voice notification system.
Stars: ✭ 21 (+31.25%)
Mutual labels:  notifications
wasm-extension-template
An easy-to-use template for Rust web extensions. The Rust code is compiled to WASM and ran as a content script.
Stars: ✭ 78 (+387.5%)
Mutual labels:  extension
vscode-odoo-snippets
Develop Odoo modules faster and with no Typing Errors.
Stars: ✭ 20 (+25%)
Mutual labels:  extension
yithemes
Atom One Dark & One Light themes ported for VS Code.
Stars: ✭ 12 (-25%)
Mutual labels:  extension
SimpleBatchUpload
Allows for basic, no-frills uploading of multiple files
Stars: ✭ 15 (-6.25%)
Mutual labels:  mediawiki
MongoosePush
MongoosePush is a simple Elixir RESTful service allowing to send push notification via FCM and/or APNS.
Stars: ✭ 101 (+531.25%)
Mutual labels:  notifications
eshteb
Reduces the anger of an Iranian when typing in the wrong language!
Stars: ✭ 42 (+162.5%)
Mutual labels:  extension
nekocap
Browser extension for creating & uploading community captions for YouTube, niconico and other video sharing sites.
Stars: ✭ 27 (+68.75%)
Mutual labels:  extension
cake-vso
Cake integration for Azure DevOps.
Stars: ✭ 19 (+18.75%)
Mutual labels:  extension
debounced-notifications
Basecamp style notification debouncing / throttling for Laravel notifications.
Stars: ✭ 30 (+87.5%)
Mutual labels:  notifications
vsc
☢️ A fresh-looking, neon theme for Visual Studio Code Almost radioactive.
Stars: ✭ 24 (+50%)
Mutual labels:  extension
core
🔥 Antares Core Implemenation. Most important project layer, this is the heart for your app. ACL, notifiter, console, geoip, areas, utils and many more...
Stars: ✭ 24 (+50%)
Mutual labels:  extension
ex unit notifier
Desktop notifications for ExUnit
Stars: ✭ 111 (+593.75%)
Mutual labels:  notifications

Discord (mw-discord)

MediaWiki extension for sending notifications to a Discord webhook 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.

Multiple webhook URLs are supported and messages will be sent to all of them.

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

Example

Requirements

  • Discord webhook URL: This can be obtained by editing a channel on a server with the correct permissions.
  • MediaWiki 1.36+. This extension aims to support the latest LTS release. Ensure you are using the correct branch of this extension for your MediaWiki version. The master branch includes changes only applicable for the latest MediaWiki version.

Recommended

  • cURL: By default, this extension sends requests using cURL. If you don't have cURL, you could try setting $wgDiscordUseFileGetContents to true instead, but this is not recommended.

Installation

  1. Clone this repository to your MediaWiki installation's extensions folder using git clone https://github.com/jaydenkieran/mw-discord.git -b REL1_35 Discord
  2. Modify your LocalSettings.php file and add:
// Load the extension
wfLoadExtension( 'Discord' );
// Set the webhook URL(s) (string or array)
$wgDiscordWebhookURL = [ '' ];

For further configuration variables, see below.

Getting a webhook URL

To get a webhook URL for use with this extension, open the Discord client and go to a server where you have the Manage Webhooks permission. Click the cog icon when hovering over a text channel, switch to the Webhooks tab on the left of the interface, and click 'Create webhook'. The webhook URL can then be copied from that interface.

Configuration

This extension can be configured using the LocalSettings.php file in your MediaWiki installation.

Variable Type Description
$wgDiscordWebhookURL string/array Discord webhook URLs

Optional

Variable Type Description Default
$wgDiscordNoBots bool Do not send notifications that are triggered by a bot account true
$wgDiscordNoMinor bool Do not send notifications that are for minor edits false
$wgDiscordNoNull bool Do not send notifications for null edits true
$wgDiscordSuppressPreviews bool Force previews for links in Discord messages to be suppressed true
$wgDiscordMaxChars int Maximum amount of characters for user-generated text (e.g summaries, reasons). Set to null to disable truncation null
$wgDiscordMaxCharsUsernames int Maximum amount of characters for usernames. Set to null to disable truncation 25
$wgDiscordDisabledHooks array List of hooks to disable sending webhooks for (see below) []
$wgDiscordDisabledNS array List of namespaces to disable sending webhooks for []
$wgDiscordDisabledUsers array List of users whose performed actions shouldn't send webhooks []
$wgDiscordPrependTimestamp bool Prepend a timestamp (in UTC) to all sent messages. The format can be changed by editing the MediaWiki message discord-timestampformat false
$wgDiscordUseFileGetContents bool Use file_get_contents instead of cURL. Requires allow_url_fopen to be set to true in php.ini. Not recommended as cURL makes simultaneous calls instead. false
$wgDiscordUseEmojis bool Prepend emojis to different types of messages to help distinguish them false
$wgDiscordEmojis array Map of hook names and their associated emojis to prepend to messages if $wgDiscordUseEmojis is enabled See extension.json

Hooks used

  • PageSaveComplete - New edits to pages and page creations
  • ArticleDeleteComplete - Page deletions
  • ArticleUndelete - Page restorations
  • ArticleRevisionVisibilitySet - Revision visibility changes
  • ArticleProtectComplete - Page protections
  • PageMoveComplete - Page moves
  • LocalUserCreated - User registrations
  • BlockIpComplete - User blocked
  • UnblockUserComplete - User unblocked
  • UserGroupsChanged - User rights changed
  • UploadComplete - File was uploaded
  • FileDeleteComplete - File revision was deleted
  • FileUndeleteComplete - File revision was restored
  • AfterImportPage - Page was imported
  • ArticleMergeComplete - Article histories was merged

Approved Revs

  • ApprovedRevsRevisionApproved - Revision was approved
  • ApprovedRevsRevisionUnapproved - Revision was unapproved
  • ApprovedRevsFileRevisionApproved - File revision was approved
  • ApprovedRevsFileRevisionUnapproved - File revision was unapproved

Translation

This extension can be translated through the messages in the ì18n folder if you're a developer. As a wiki administrator, you may find it a better option to edit the messages on-site in the MediaWiki namespace.

Any excess whitespace in text that is translated will be stripped (e.g double spaces, etc).

License

This extension is licensed under the MIT License, see here for more information. This project is originally inspired by Szmyk's mediawiki-discord project, but has been rewritten completely to be more suitable for my needs.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].