スポンサーリンク
bot作成の第一歩として、Discordの開発者用画面「Developer Portal」でbotを作成します。
「Developer Portal」 (https://discord.com/developers/applications)にアクセスしてください。ご自分のDIscordアカウントでログインします。
![](https://blog.information-portal.net/wp-content/uploads/2021/08/001_開発者ログイン-2-1024x544.jpg)
Applications→New Application と進みます。
ログイン後にこの画面にならず、ブラウザ版Discordが開いてしまう場合は、再度 「Developer Portal」 (https://discord.com/developers/applications)にアクセスしてください。
![](https://blog.information-portal.net/wp-content/uploads/2021/08/002_new-app-1024x310.jpg)
botに任意の名前を付けます。他の人と被らないような名前が良いと思います。
![](https://blog.information-portal.net/wp-content/uploads/2021/08/003_create-an-app.jpg)
アイコン画像を設定します。
![](https://blog.information-portal.net/wp-content/uploads/2021/08/004_icon_1-1024x452.jpg)
好きな画像を選択してください。
![](https://blog.information-portal.net/wp-content/uploads/2021/08/005_icon_2.jpg)
![](https://blog.information-portal.net/wp-content/uploads/2021/08/006_icon_3-1-1024x431.jpg)
左側のBotを選択します。
![](https://blog.information-portal.net/wp-content/uploads/2021/08/007_icon_4-1024x401.jpg)
![](https://blog.information-portal.net/wp-content/uploads/2021/08/008_add-bot-1024x411.jpg)
![](https://blog.information-portal.net/wp-content/uploads/2021/08/009_yes.jpg)
次はbotの上のOAuth2をクリックします。認証関係の画面です。
![](https://blog.information-portal.net/wp-content/uploads/2021/08/010_auth_1-1024x412.jpg)
SCOPESはbotを選択します。
![](https://blog.information-portal.net/wp-content/uploads/2021/08/012_auth_3-1-1024x492.jpg)
少し下にスクロールし、BOT PERMISSIONSでAdministratorを選択します。
![](https://blog.information-portal.net/wp-content/uploads/2021/08/014_auth_5-1024x248.jpg)
少し上にスクロールして戻り、URLをコピーします。
このURLは、DIscordでbotを認証するためのものになります。不特定多数に公開しない方が良いと思います。URLの使い方は以下2パターンあります。
・自分が管理者となっているサーバーにbotを入れる
・他の人が管理者となっているサーバーにbotを入れてもらう
![](https://blog.information-portal.net/wp-content/uploads/2021/08/015_auth_6-1024x278.jpg)
ここでは、自分が管理者となっているサーバーにbotを入れる前提で進めます。
コピーしたURLをインターネットブラウザのアドレスバーに貼り付け、Enterを押します。
![](https://blog.information-portal.net/wp-content/uploads/2021/08/016_auth_7-1-1024x74.jpg)
以下、認証完了まで画面に従って進めてください。
![](https://blog.information-portal.net/wp-content/uploads/2021/08/017_auth_8-1024x494.jpg)
![](https://blog.information-portal.net/wp-content/uploads/2021/08/018_auth_9-1024x487.jpg)
![](https://blog.information-portal.net/wp-content/uploads/2021/08/019_auth_10-1024x544.jpg)
![](https://blog.information-portal.net/wp-content/uploads/2021/08/020_auth_11-1.jpg)
以下の画面が表示されたら、閉じて構いません。
![](https://blog.information-portal.net/wp-content/uploads/2021/08/021_auth_12.jpg)
認証が終わると、Discordの該当サーバーにbotが出現します。
![](https://blog.information-portal.net/wp-content/uploads/2021/08/022_spawn_1.jpg)
![](https://blog.information-portal.net/wp-content/uploads/2021/08/023_spawn_2.jpg)
今回はここまでで終了です。
次回以降で、現時点ではオフラインのbotに息を吹き込むための作業を行っていきます。
お疲れさまでした!
<関連記事>
![](https://blog.information-portal.net/wp-content/uploads/2021/08/A_.png)
多機能情報BOT Panderoid開発者・あるちっぷ共同運営者
国産仮想通貨SanDeGoの黎明期からSanDeGoコミュニティに参加し、積極的にサポート活動を展開。相場情報取得やフォーセット機能などの実用性に加え、多様なゲーム性を併せ持つ多機能情報BOT 「Panderoid」を開発し、Discord上で提供。アルファのチップサービス「あるちっぷ」のフロント開発を担当し、共同運営中。