Go to your server's Widget section in the Settings. Then:
Enable the widget.
Select an instant invite channel.
Copy the server ID.
Note: Those might already be configured if you used another Discord widget before.
Enable the widget (red), select an instant invite (yellow), and copy the ID (green). Note: This image shows an unconfigured page.
Set up the widget
Go to MediaWiki:Custom-DiscordChat-id on your wiki and make sure its content is exactly the server ID you copied in the last step, for example (if you are using the Dev Wiki Discord):