Fandom Developers Wiki

This page, or parts of it, are still untranslated. Please translate it to the appropriate language (日本語).

DiscordIntegrator を使用すると、Discordウィジェットをサイドバーまたはコンテンツといっしょにできます。 Discordウィジェットは、サーバー内のすべてのオンラインユーザー、ユーザーのゲームアクティビティ、音声チャネル内のすべてのユーザーなどを表示できます。

ドキュメントを読んでもまだDiscordIntegratorの設定方法がわからない場合は、 the step-by-step マニュアルを読んでください。

The video is a little outdated, make sure to read the below instructions for finding the widget setting in discord.

Installation[]

Configuration[]

ウィジェットを有効にする[]

Discordサーバーの管理者は、Discordサーバーの設定画面から"Widget"設定セクションに移動して、ウィジェットを有効にすることができます。サーバーへのウィジェットの埋め込みを有効にするには、"ウィジェットを有効にする"チェックボックスをオンにします。ユーザーがウィジェットを介してサーバーに接続できるようにしたい場合は、"インスタント招待チャンネル"オプションで招待先も選択する必要があります。

重要: この方法で表示されるサーバーIDは、ウィジェットのセットアップに必須です。これについては、以下のセクションとテンプレートで説明します。

Content[]

After the script is installed through the methods explained above, it is possible to make the widget show up in the page content. It is advised to create a template on your wiki and copy the contents of {{DiscordIntegrator}} to it. After that, the template can be used as:

{{DiscordIntegrator
| id = 402223976375517194
| theme = light
| width = 300px
| height = 500px
}}

which gives:

If you see this text, you might have incorrectly imported DiscordIntegrator. Please add dev:DiscordIntegrator/code.js to your MediaWiki:ImportJS. If this is not the case, leave a message on the talk page and include a link to this page.

Note: DiscordIntegrator does not work on the mobile skin, which will display an error message instead of the Discord widget. To prevent the widget from displaying on the mobile skin, you can set the template type of the widget to a template type that doesn't display on mobile (such as Navbox).

For more complicated usage you can check the DiscordIntegrator template documentation itself.

サイドバー[]

The script can be configured to add the widget to the sidebar of the wiki on the FandomDesktop skin through editing several MediaWiki pages. Any MediaWiki page relating to the configuration of DiscordIntegrator starts with MediaWiki:Custom-DiscordIntegrator-config- and after it goes the name of the configuration option. For example, to configure the ID of the server, you'd need to go to MediaWiki:Custom-DiscordIntegrator-config-id.

The widget will appear in the siderail, only if the ID of the server is set in configuration options. Configuration options have same names as configuration options when adding the widget to content, except with the addition of a few parameters:

オプション Type 内容 デフォルト
id Number 表示するサーバーのID None
title String モジュールのタイトル None
moduleHeight Number モジュールの高さ None
text String ウィジェットの上の文 None
footer String ウィジェットの下の文 None
theme dark or light ウィジェットのテーマ Inherits the theme on FandomDesktop.
width Number of pixels (Xpx) or percent (Y%) ウィジェットの横幅 100%
height Number of pixels (Xpx) or percent (Y%) ウィジェットの高さ 400px for sidebar, 90% for template
logged-in Boolean ログインしているユーザーにだけ表示するか false

ウィジェットの例は、このWikiのサイドバーにあります。

Frequently Asked Questions[]

ウィジェットの色を変えたい
BetterDiscordをサポートしていないように、ウィジェットはiframeなので、今のところそのスタイルは変更できません。
読み込みが終わらないの
サーバー設定でウィジェットを有効にしていないかもしれません。
ウィジェットを有効にするセクションの説明に従ってウィジェットを有効にして、ページを更新します。
時に数分待つ事も必要です。
有効の場合、おそらく、DiscordIntegratorテンプレート全体をMediaWiki:Custom-DiscordIntegrator-config-idページに貼り付けたはずです。その場合は、そのページの内容をサーバーIDのみにしてください。
ウィジェットの読み込みがまだ終わらないの
Discordのキャッシュが更新されるまで少し待ちましょう。
待っている間に、MediaWiki:Custom-DiscordIntegrator-config-idの内容がサーバーIDだけであるかどうかを確認してください。
DiscordIntegratorテンプレート全体をそこに配置した場合、それは機能しません。そこにサーバーIDしかないことを確認してください。
テンプレートのループが検出されました: テンプレート:DiscordIntegrator"って出てるんだけど!
テンプレートを正しくコピーしませんでしたか?
設置したいWikiの同じ名前のテンプレートページにテンプレートをコピーする必要があります。
例えば、Diep.io Wikiではここに設置されるべきです。
テンプレートの内容をコピーしたら、そのテンプレートを使用して、DiscordウィジェットをWikiページに表示させる必要があります。テンプレートの使い方に関する一般的な情報はここにあります。