Giter Site home page Giter Site logo

discord-bot-world-ruler's Introduction

worldruler

the discord server deployed on Microsoft Azure

how to develop

開発のしかた (やってみたいひとむけ)

web-side

web上の操作が必要なものです

create discord bot on discord developer portal

discord botをdiscord開発者ポータルで作成します

下記参考リンクの とりあえずアプリケーションとbotの作成 までが参考になります

必ず client idclient secret は控えておいてください

参考

local-side

ローカルマシン上で用意しないといけないものです

1. install git

バージョン管理ソフト git をインストールしてください

パッケージマネージャを使う場合

winget (windows)
winget install Git.Git
chocolatey (windows)
choco install git
Homebrew (macOS)
  1. install from brew

Homebrewからインストールします

brew install git
  1. check version

バージョンを確認します

git --version
git version 2.24.3 (Apple Git-128)
  1. update .zshrc

.zshrc(ズーイッシュアールシー)を更新します

echo "PATH=/usr/local/bin/git:$PATH" >> ~/.zshrc
  1. reload shell

シェルを再起動します

exec $SHELL -l
  1. check version again

再度バージョンを確認します

Apple Git の文言が消えていれば問題ないです

git --version
git version 2.24.3
apt (debian/linux)
sudo apt install -y git
yam (debian/linux)
sudo yum install -y git

2. install node.js and npm

botプログラムの実行環境 node.js と、botプログラムが依存しているパッケージマネージャ npm をインストールしてください

インストーラを使う場合

ここから取得してください

winget (windows)
winget install OpenJS.NodeJS.LTS
chocolatey (windows)
choco install nodejs-lts
Homebrew (macOS)
brew install nodejs
apt (debian/linux)
sudo apt install -y nodejs npm
yam (debian/linux)
sudo yum install -y nodejs npm

3. clone this repos

このリポジトリをクローンします

git clone <this_repos_url>

4. exec npm i

依存ライブラリをローカルプロジェクトにインストールします

npm i

5. copy .env.default to .env.dev and replace placeholders in .env.dev

.env.default をコピーし、 .env.dev という名前にし、仲のデータを適切な値に置き換えます

6. exec npm run dev

開発モードで実行します

そのままエラーなく動作すれば問題ありません

npm run dev

また、そのままの状態でBOTを招待したサーバで !time と打ってみます

現在時刻が返されれば、うまく動作しています

create and run unittest

deploy to Azure

discord-bot-world-ruler's People

Contributors

cocoalix avatar

Watchers

 avatar Kostas Georgiou avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.