Compare commits

...

2 Commits

Author SHA1 Message Date
dd5d35d043 update gitignore 2023-10-11 13:52:53 +00:00
7b59355a3c add: set token into args 2023-10-11 13:52:42 +00:00
5 changed files with 21 additions and 7 deletions

3
.gitignore vendored
View File

@ -1,3 +1,4 @@
obj/*
PyMenu
src/config.h
src/config.h
core

View File

@ -26,4 +26,4 @@ RUN make
COPY src/config.h src/config.h
ENTRYPOINT ["./PyMenu"]
ENTRYPOINT ["./PyMenu", "$BOT_TOKEN"]

View File

@ -46,15 +46,19 @@ make
git clone https://git.chauvet.pro/starnakin/PyMenuBOT/
cd PyMenuBOT
```
- Config the bot
Edit the `src/config.h` file and set the discord bot token
- Build the docker image.
``` bash
docker build -t pymenu .
```
- Config the bot
Edit the `docker-compose.yml` file and set the discord bot token
- Run the docker
```bash
docker run --restart=always --name=pymenu -d pymenu
docker-compose up -d
```
- Run the docker - alternative without docker-compose
```bash
docker run --restart=always --name=pymenu -e BOT_TOKEN=token -d pymenu
```
## Setting up on Your Discord Server

9
docker-compose.yml Normal file
View File

@ -0,0 +1,9 @@
version: "3"
services:
pymenu:
container_name: pymenu
image: pymenu
build: .
restart: always
environment:
- BOT_TOKEN=TOKEN

View File

@ -5,9 +5,9 @@
#include "config.h"
int main()
int main(int ac, char **av)
{
dpp::cluster bot(BOT_TOKEN, dpp::i_default_intents | dpp::i_message_content);
dpp::cluster bot(ac == 2 ? av[1] : BOT_TOKEN, dpp::i_default_intents | dpp::i_message_content);
bot.on_log(dpp::utility::cout_logger());