How to host BFYBOT - BFY-PDCT/BFYBOT GitHub Wiki

KR

BFY๋ด‡์€ ์Šค์Šค๋กœ ์šด์˜ํ•˜๊ธฐ ์‰ฝ๋„๋ก ์ œ์ž‘๋œ ๋ด‡์ž…๋‹ˆ๋‹ค. ์•„๋ž˜ ๋‹จ๊ณ„๋ฅผ ๋”ฐ๋ผํ•˜๋ฉด ์‰ฝ๊ฒŒ BFY๋ด‡์„ ์šด์˜ํ•ด๋ณผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

์œˆ๋„์šฐ

1.ํŒŒ์ด์ฌ์„ ์„ค์น˜ํ•˜๊ณ , ํ™˜๊ฒฝ ๋ณ€์ˆ˜ PATH๋ฅผ ์ถ”๊ฐ€ํ•ด์ฃผ์„ธ์š”. (ํŒŒ์ด์ฌ 3.9๋Š” ์ถฉ๋Œ์ด ๋ฐœ์ƒํ•˜๋ฏ€๋กœ ๋˜๋„๋ก ํŒŒ์ด์ฌ 3.8์„ ์„ค์น˜ํ•ด์ฃผ์„ธ์š”.) (๊ด€๋ จ ์ •๋ณด๋Š” ์ธํ„ฐ๋„ท์— ๋งŽ์œผ๋‹ˆ ์—ฌ๊ธฐ์„  ์ƒ๋žตํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.)

2.์—ฌ๊ธฐ์—์„œ ์ตœ์‹  ๋ฒ„์ „์˜ ์†Œ์Šค ์ฝ”๋“œ๋ฅผ ์›ํ•˜๋Š” ํด๋”์— ๋‹ค์šด๋กœ๋“œ๋ฅผ ๋ฐ›๊ณ , ์••์ถ•์„ ํ’€์–ด์ฃผ์„ธ์š”.

3.(์••์ถ•์„ ํ‘ผ ๊ฒฝ๋กœ)\bot\cmds\config.py ํŒŒ์ผ์„ ํ…์ŠคํŠธ ์—๋””ํ„ฐ ๋“ฑ์œผ๋กœ ์—ด์–ด Owner Setting์„ ํŽธ์ง‘ํ•ฉ๋‹ˆ๋‹ค. ์—ฌ๊ธฐ๋ฅผ ์ฐธ๊ณ ํ•ด์ฃผ์„ธ์š”.

4.Windows+X๋ฅผ ๋ˆŒ๋Ÿฌ Windows Powershell์„ ์‹คํ–‰ํ•ด์ฃผ์„ธ์š”.

5.py -3 -m pip install -r (์••์ถ•์„ ํ‘ผ ๊ฒฝ๋กœ)\requirements.txt๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”. (๋งŒ์•ฝ C:\hello์— ์••์ถ•์„ ํ’€์—ˆ๋‹ค๋ฉด py -3 -m pip install -r C:\hello\requirements.txt์™€ ๊ฐ™์ด ์ž…๋ ฅํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค.)

6.py -3 (์••์ถ•์„ ํ‘ผ ๊ฒฝ๋กœ)\bot\bot.py๋ฅผ ์ž…๋ ฅํ•˜๋ฉด ์‹คํ–‰๋ฉ๋‹ˆ๋‹ค.

๋ฆฌ๋ˆ…์Šค

*๋ด‡์ด ๊ณ„์† ์‹คํ–‰๋˜๊ฒŒ ํ•˜๋ ค๋ฉด tmux ๋“ฑ์„ ์‚ฌ์šฉํ•˜์‹œ๋Š” ๊ฒƒ์„ ์ถ”์ฒœ๋“œ๋ฆฝ๋‹ˆ๋‹ค.

1.ํŒŒ์ด์ฌ์„ ์„ค์น˜ํ•ด์ฃผ์„ธ์š”. (ํŒŒ์ด์ฌ 3.9๋Š” ์ถฉ๋Œ์ด ๋ฐœ์ƒํ•˜๋ฏ€๋กœ ๋˜๋„๋ก ํŒŒ์ด์ฌ 3.8์„ ์„ค์น˜ํ•ด์ฃผ์„ธ์š”.) (๊ด€๋ จ ์ •๋ณด๋Š” ์ธํ„ฐ๋„ท์— ๋งŽ์œผ๋‹ˆ ์—ฌ๊ธฐ์„  ์ƒ๋žตํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.)

2.์—ฌ๊ธฐ์—์„œ ์ตœ์‹  ๋ฒ„์ „์˜ ์†Œ์Šค ์ฝ”๋“œ๋ฅผ ์›ํ•˜๋Š” ํด๋”์— ๋‹ค์šด๋กœ๋“œ๋ฅผ ๋ฐ›๊ณ , ์••์ถ•์„ ํ’€์–ด์ฃผ์„ธ์š”. wget (ํŒŒ์ผ๋งํฌ)๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ๋‹ค์šด๋กœ๋“œ๊ฐ€ ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.

3.(์••์ถ•์„ ํ‘ผ ๊ฒฝ๋กœ)/bot/cmds/config.py ํŒŒ์ผ์„ ํ…์ŠคํŠธ ์—๋””ํ„ฐ ๋“ฑ์œผ๋กœ ์—ด์–ด Owner Setting์„ ํŽธ์ง‘ํ•ฉ๋‹ˆ๋‹ค. ์—ฌ๊ธฐ๋ฅผ ์ฐธ๊ณ ํ•ด์ฃผ์„ธ์š”.

4.(sudo) pip install -r (์••์ถ•์„ ํ‘ผ ๊ฒฝ๋กœ)/requirements.txt๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”. (๋งŒ์•ฝ /usr/hello/hi์— ์••์ถ•์„ ํ’€์—ˆ๋‹ค๋ฉด (sudo) pip install -r /usr/hello/hi/requirements.txt์™€ ๊ฐ™์ด ์ž…๋ ฅํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค.)

5.(sudo) python3 (์••์ถ•์„ ํ‘ผ ๊ฒฝ๋กœ)/bot/bot.py๋ฅผ ์ž…๋ ฅํ•˜๋ฉด ์‹คํ–‰๋ฉ๋‹ˆ๋‹ค.

EN

BFY bot is a bot designed to be easy to operate by itself. You can easily operate BFYbot by following the steps below.

window

  1. Install Python and add the environment variable PATH. (Python 3.9 crashes, so please install Python 3.8 as much as possible.) (There is a lot of related information on the Internet, so that I will skip it here.)

  2. Download the latest version of the source code from here to a folder of your choice and extract it.

  3. Open the (unpacked path)\bot\cmds\config.py file with a text editor, etc., and edit the Owner Setting. Please refer to here.

  4. Run Windows Powershell by pressing Windows+X.

  5. Enter py -3 -m pip install -r (unpacked path)\requirements.txt. (If you unzipped it to C:\hello, you could enter py -3 -m pip install -r C:\hello\requirements.txt.)

  6. Enter py -3 (unpacked path)\bot\bot.py to run.

Linux

*It is recommended to use tmux, etc., to keep the bot running.

  1. Install Python. (Python 3.9 crashes, so please install Python 3.8 as much as possible.) (There is a lot of related information on the Internet, so that I will skip it here.)

  2. Download the latest version of the source code from here to a folder of your choice and extract it. If you use wget (file link), you can download it.

  3. Open the (unpacked path)/bot/cmds/config.py file with a text editor, etc., and edit the Owner Setting. Please refer to here.

  4. Enter (sudo) pip install -r (unpacked path)/requirements.txt. (If you unzipped it to /usr/hello/hi, you can enter (sudo) pip install -r /usr/hello/hi/requirements.txt.)

  5. Enter (sudo) python3 (unpacked path)/bot/bot.py to run.