LoginSignup
1
0

More than 1 year has passed since last update.

Discord.jsで多機能Botを作る ~開発環境の構築~【#1】

Last updated at Posted at 2022-03-26

今回からDiscord.jsで多機能Botを作っていきます

開発環境

  • Windows10
  • npm 8.3.0 (今からインストールします)
  • node 17.1.0 (今からインストールします)

Node.jsのインストール

Node.jsの公式サイトに行って、Nodeをインストールします。

Currentをクリックして、
Qiita-1.png

Windows Installerをダウンロードしましょう。
Qiita-2.png
ダウンロードが終わったら、インストーラーを開いて、指示に従ってインストールしましょう。
npmは、Nodeをインストールすると一緒についてくるらしいです。
下記のコマンドを実行して、返事が来たら成功です

npm -v
8.3.0

node -v
v17.1.0

Visual Studio Code(VScode)のインストール

VScodeの公式サイトに行きます。

Windowsをクリックして、インストーラーをダウンロードしてください。
Qiita-3.png
インストーラーを起動し、指示に従ってインストールしましょう。

DiscordのBotを作る準備

WindowsPowerShellをインストールし、下記のコマンドを実行しましょう

cd "作業フォルダを置くディレクトリ"
mkdir discordbot
cd discordbot
npm init -y
npm i discord.js js ms canvs aurora-mongo
code .

すると多分VScodeが起動すると思います。
これで、開発環境の構築は終了です。

次回 ~DiscordのBotの起動とコマンドハンドラーの作成~

リンク

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0