- Clone this repo
$ git clone https://github.com/Roykesydon/HackerRank-DiscordBot.git
- Install the Python dependencies
$ pip install -r requirements.txt
- Write
./config.json
- You need to apply discord bot token from Discord Developer Portal
cp config.example.json config.json
- Write
.env
- You need to apply OpenAI API and HuggingFace API token from OpenAI and HuggingFace
cp .env.example .env
- Run the code
$ python main.py
- Look at Developer Guide for more details about how to start developing this repository.
- Refer to Contributing Guidelines for the conventions and rules that contributors should follow.
- Clone this repo
$ git clone https://github.com/Roykesydon/HackerRank-DiscordBot.git
- Write
./config.json
- You need to apply discord bot token from Discord Developer Portal
cp config.example.json config.json
- Write
.env
- You need to apply OpenAI API and HuggingFace API token from OpenAI and HuggingFace
cp .env.example .env
- Run the code
$ docker-compose up -d
.
├── README.md # introduce this project
├── assets
│ └── logo.png
├── config.example.json
├── config.json
├── .example.env
├── .env
├── core # business logic
│ ├── commands # all coomands
│ │ ├── description.py
│ │ ├── help.py
│ │ └── upload.py
│ ├── config.py # config and language loader
│ ├── database.py # database connection
│ ├── events # all events
│ │ └── directly_chat.py
│ └── message.py # message handler
├── lang # language files
│ └── en.json
├── main.py # program entry point
└── storage # save uploaded files
每次增修內容前請依循下列流程進行:
- Pull origin/develop 最新版本
$ git pull origin develop
- 在 local 新增 branch 並切換
$ git checkout -b <NEW_BRANCH_NAME>
- 編輯完成後進行 commit
$ git add . $ git commit -m "COMMIT_MSG"
- 回到 develop 再次獲取 origin/develop 的最新版本、與自己的修正合併並修正出現的 conflict
$ git checkout develop $ git pull $ git checkout <NEW_BRANCH_NAME> $ git rebase develop
- 將新 branch 的修正與 develop 合併並 push 到 Github
$ git checkout develop $ git merge <NEW_BRANCH_NAME> $ git push