mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-11-01 13:25:18 +08:00
* 重构文档结构:移除 docs 目录,调整文件组织结构 * Reorder "插件 SDK API" section in docs.json * Refactor and clarify various documentation sections * Refine warnings and info boxes across multiple docs * Refactor and simplify Japanese documentation content * Update package.json to include mintlify as a dependency and add pnpm-lock.yaml for dependency management * Update blog link and add description in docs.json --------- Co-authored-by: Junyan Chin <[email protected]>
56 lines
2.4 KiB
Plaintext
56 lines
2.4 KiB
Plaintext
---
|
|
title: "Discord ボットに接続"
|
|
---
|
|
|
|
## ボットの作成
|
|
|
|
[Discord Developer Portal](https://discord.com/developers/applications)にアクセスし、ログインしてアプリケーションを作成します。
|
|
|
|

|
|
|
|
基本情報を変更し、「Save Changes」をクリックして保存します。
|
|
|
|

|
|
|
|
左側の「Bot」をクリックし、「Reset Token」をクリックして、生成された Token をコピーします。
|
|
|
|

|
|
|
|
そして、このページの「Privileged Gateway Intents」のすべてのオプションをチェックし、「Save Changes」をクリックして保存します。
|
|
|
|

|
|
|
|
**最後に、左側の「OAuth2」をクリックし、ページの「Client ID」をコピーします。**
|
|
|
|
## LangBot に接続
|
|
|
|
新しいボットを追加するためにクリックし、前の手順で取得した「Client ID」と「Token」を設定に入力します。
|
|
|
|

|
|
|
|
<Warning title="中国本土内でこのアダプターを使用している場合、ネットワークプロキシを設定する必要がある場合があります。">
|
|
|
|
</Warning>
|
|
|
|
入力後、LangBot を起動します。設定が成功した場合、ログに `[02-02 16:48:15.263] manager.py (68) - [INFO] : Initializing platform adapter 1: discord` と表示されます。LangBot を実行し続けてください。
|
|
|
|
## ボットをサーバーに招待
|
|
|
|
まずサーバーを作成し、次にボットをサーバーに招待する必要があります。
|
|
|
|
「OAuth2」ページに移動し、「URL Generator」を選択し、「bot」を選択して、画像に示されている権限をチェックします。
|
|
|
|

|
|
|
|

|
|
|
|
「Copy」をクリックし、生成された URL をブラウザに貼り付けて開き、ボットをサーバーに招待します。
|
|
|
|

|
|
|
|
## ボットの使用
|
|
|
|
グループまたはプライベートメッセージでボットを通常どおり使用できるようになりました。
|
|
|
|

|