DiscordIntegrator/instructions

This is a step-by-step manual on how to install DiscordIntegrator. It will only outline the important parts and not go into the advanced configuration.
== This manual is assuming the following ==
* Your wiki is YOURWIKI.fandom.com. When following links in the manual, don't forget to replace YOURWIKI.fandom.com with the URL of your wiki. For example, if your wiki is Disney Wiki, the correct link would be disney.fandom.com.
* You already have a Discord server. If you don't, read about creating one here.
* You are an administrator of the wiki and an administrator of the Discord server you are trying to embed into the page.
* You've read the documentation page thoroughly at least twice and still didn't understand how to embed a Discord widget into your wiki.
== Step 1: Import DiscordIntegrator ==
DiscordIntegrator script needs to be imported to your wiki through ImportJS in order to work.
# Go to https://YOURWIKI.fandom.com/wiki/MediaWiki:ImportJS?action=edit
# Paste dev:DiscordIntegrator/code.js at the top of the page.
# Click on the Save changes button to save the page.
== Step 2: Enable Discord widget ==
Discord widget needs to be enabled on your Discord server in order for DiscordIntegrator to be able to embed a widget for your Discord server.
# Open Discord.
# Select your server on the server list.
# Click on the server title above the channel list to see the dropdown with Server Settings. You should see something like this: 
# Click on the Server Settings option.
# Look at the sidebar of the Server Settings and you should see a Widget option, like this: 
# Click on the Widget option.
# You should see a screen like this: 
# If the checkbox next to the Enable Server Widget is just like in the picture above, click on it to enable the server widget.
# Select a channel from the Invite Channel dropdown to make the widget invite people into that channel. This means that when people click on the Connect button on your Discord widget, they will arrive in that channel. If there is no channel set in this option, the Connect button won't appear, so if you want people to be able to join your server through the widget, set this option to a channel.
# Click on the Copy button in the Server ID section to copy your server ID, and save your server ID somewhere because it will be used for embedding the widget later.
# When properly set up, your server settings should look something like: 
== Step 3: Create a DiscordIntegrator template ==
For easier use of DiscordIntegrator, you would have to have a template for embedding Discord widgets into pages. If you don't want to embed the Discord widget into pages and just want to embed it into the wiki's sidebar, skip directly to step 5.
# Open [ this page].
# Select all text in the editor box and copy it.
# Go to https://YOURWIKI.fandom.com/wiki/Template:DiscordIntegrator?action=edit
# Paste the previously copied text into it.
# Click on the Save button to save the page.
== Step 4: Use the DiscordIntegrator template ==
Now you should be able to embed the widget into pages by using source editor to insert the following into pages:
where <YOUR SERVER ID> should be replaced by the server ID you copied and saved in step two. For example, and this is just an example, if you wanted to embed Dev Wiki's Discord server (whose server ID is 246075715714416641), you would use:
{{DiscordIntegrator
|id = 246075715714416641
|width = 300px
|height = 500px
}}
which will result in:
== Step 5: Put the widget into the sidebar ==
# Go to https://YOURWIKI.fandom.com/wiki/MediaWiki:Custom-DiscordIntegrator-config-id?action=edit
# Paste the server ID you copied in step two into it. Only the server ID must be placed on the page. Copying the whole DiscordIntegrator template will not work.
# Click on the Save changes button to save the page.
== I still don't understand! ==
If that's the case, use the talk page to ask questions on how to set up the widget or enter the Fandom Developers Discord server and ask for help on setting DiscordIntegrator up over there. Don't forget to note which step are you stuck on and provide the URL to your wiki.
Category:Guides