ReplyAndClose gives admins and discussions moderators the ability to simultaneously post a final reply and close the thread. The script can be configured to set the reason for closing the thread, the default reply and an object for storing generic replies.

Note that this works only on board threads.


Importing multiple scripts? This quick guide shows how to combine the imports.
  • For site-wide use, an administrator can add the line below to the wiki's MediaWiki:ImportJS page.
  • For personal use, add the code snippet below to your global.js page (for use on all wikis) or your common.js page on your wiki (for use on a single wiki). Note that personal JS must be enabled for your account.
    type: 'script',
    articles: [


Key Description Type Default
reason Reason for closing the thread string see reply $1*
def Default reply string
generic An object for storing generic replies object {}
  • $1 is changed to a link to the reply that you'll be posting; format: [[#<number>]]

All configurations made to the script are to be stored in the replyAndClose object, like so:

window.replyAndClose = {
    reason: 'Please see reply $1 for the reason',
    def: 'Hello!\n\nThis thread is a violation of our [[:Category:Site policies|policies]] and is thus being closed. Please contact an [[Special:Listusers/sysop|administrator]] if you feel like this was a mistake.\n\nThanks.',
    generic: {
        'inappropriate': 'Hi!\n\nThe topic of this thread is inappropriate for this wiki, which is why I\'ve closed it. Please see to it that this does not happen again.\n\nThanks.',
        'offtopic': 'Hi!\n\nWhile we appreciate the time you took to post a thread here, the topic is not suitable for {{SITENAME}}. This thread will be closed now, but we hope that your next post will be on-topic.\n\nThanks.',
        'archive': 'This thread has long served its purpose and has been target to spam replies. It does not need to be open any longer.'

Remember, this goes above the import call!


May 15, 2016
Initial release.
Community content is available under CC-BY-SA unless otherwise noted.

Fandom may earn an affiliate commission on sales made from links on this page.

Stream the best stories.

Fandom may earn an affiliate commission on sales made from links on this page.

Get Disney+