rainbow0210 / SlashCommandTest_JS

This bot try to use Discord.js SlashCommand.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Discord_SlashCommandTest_JS

Download

Click

English

Sorry, I am not very good at English... (DeepL Transrator)

and, source code comment out and message is Japanese.

This bot try to use Discord.js SlashCommand.

Given that "npm" and "Node.js" installed.(Install Method→※Japanese site Google translation)

See sites(Japanese)

https://qiita.com/yuu_1st/items/aaa6ea92408726a0157e

https://qiita.com/hitori_yuu/items/3b6c02fac5c610f0615a

https://qiita.com/narikakun/items/a897104e4bd55ca1e166

Operating Enviroment

npm 8.19.2

Node.js 18.14.0 (https://nodejs.org/en/)

discord.js 14.7.1(https://discord.js.org/)

How use?

①".env" open.

②"your_discord_bot_token" write your discord bot token.

③Open command prompt(Windows) or Terminal(Mac, Linux).

④Move "Discord_SlashCommandTest-main" directory.

⑤Typing command "npm install".

⑥Typing command "node src/index.js".

Command List

・Global Command

/hello→Reply "hi!".

・Guild Command

/ping→Reply "Pong!".

/auth→Reply "auth start!".

Japanese

これは自分がDiscord.jsでスラッシュコマンドを試すために作ったものです。 npmやNode.jsは導入済み前提で説明をさせていただきます。(入れ方はこちらのサイトを参考にすると良いかもしれません→https://qiita.com/taiponrock/items/9001ae194571feb63a5e

参考元

https://qiita.com/yuu_1st/items/aaa6ea92408726a0157e

https://qiita.com/hitori_yuu/items/3b6c02fac5c610f0615a

https://qiita.com/narikakun/items/a897104e4bd55ca1e166

動作確認済み環境

npm 8.19.2

Node.js 18.14.0 (https://nodejs.org/ja/)

discord.js 14.7.1(https://discord.js.org/)

使い方

①「.env」ファイルの中にある、「your_discord_bot_token」の部分を自分のtokenに書き換えます。

②Windowsであればコマンドプロンプト、LinuxやMacであればターミナルを開き、「src」というフォルダが存在するディレクトリーに移動し、最初に「npm install」と打ってください。次に「node src/index.js」と打つことで起動させることができます。

コマンドリスト

・グローバルコマンド

/hello→「hi!」と返信します.

・サーバーコマンド

/ping→「Pong!」と返信します。

/auth→「auth start!」と返信します。

About

This bot try to use Discord.js SlashCommand.


Languages

Language:JavaScript 100.0%