diff --git a/.env b/.env index 4c4b1cf..dc2fa6e 100644 --- a/.env +++ b/.env @@ -9,27 +9,27 @@ BOT_MAX_SONGS_HISTORY_SIZE=60 BOT_MAX_PLAYLISTS_PER_USER=25 BOT_MAX_SONGS_IN_USER_PLAYLIST=500 -BOT_DISCORD_TOKEN=undefined -BOT_DISCORD_CLIENT_ID=undefined -BOT_DISCORD_OVERPOWERED_ID=undefined +BOT_DISCORD_TOKEN= +BOT_DISCORD_CLIENT_ID= +BOT_DISCORD_OVERPOWERED_ID= -BOT_GOOGLE_EMAIL=undefined -BOT_GOOGLE_PASSWORD=undefined +BOT_GOOGLE_EMAIL= +BOT_GOOGLE_PASSWORD= -BOT_SPOTIFY_CLIENT_SECRET=undefined -BOT_SPOTIFY_CLIENT_ID=undefined +BOT_SPOTIFY_CLIENT_SECRET= +BOT_SPOTIFY_CLIENT_ID= -BOT_SOUNDCLOUD_CLIENT_ID=undefined -BOT_SOUNDCLOUD_TOKEN=undefined +BOT_SOUNDCLOUD_CLIENT_ID= +BOT_SOUNDCLOUD_TOKEN= -BOT_YANDEXMUSIC_TOKEN=undefined -BOT_YANDEXMUSIC_UID=undefined +BOT_YANDEXMUSIC_TOKEN= +BOT_YANDEXMUSIC_UID= -BOT_VKONTAKTE_TOKEN=undefined +BOT_VKONTAKTE_TOKEN= -BOT_GENIUS_TOKEN=undefined +BOT_GENIUS_TOKEN= -MONGO_URI=undefined -MONGO_DATABASE_NAME=undefined +MONGO_URI= +MONGO_DATABASE_NAME= TZ=Europe/Kiev diff --git a/updateAndRunInDocker.bat b/updateAndRunInDocker.bat new file mode 100644 index 0000000..6221511 --- /dev/null +++ b/updateAndRunInDocker.bat @@ -0,0 +1,4 @@ +docker image pull alexincube/aicotest:latest +docker volume create --name=aicbot-mongo-volume +docker compose stop +docker compose up --detach --no-build --remove-orphans diff --git a/wiki/API-Configure.md b/wiki/API-Configure.md index ea14e91..3255c65 100644 --- a/wiki/API-Configure.md +++ b/wiki/API-Configure.md @@ -14,10 +14,18 @@ You should see a page like this: You can edit your application's name, description, and avatar here. Once you've done that, then congratulations—you're now the proud owner of a shiny new Discord bot! You're not entirely done, though. -4. On "General Information" page copies the Application ID, this is your Client ID. -5. On the sidebar select section "Bot" -6. Press "Reset token" button and copy token. -7. Also enable all "Privileged Gateway Intents" +4. Go to "Installation" page +5. In "Installation Contexts" disable "User Install", enable "Guild install" +6. In "Default Install Settings" add scope "Bot" and permission "Administrator" + +Now your installation page must look like this + +![discord-dev-installation-setup](images/api-configure/discord-dev-installation-setup.png) + +7. On "General Information" page copies the Application ID, this is your Client ID. +8. On the sidebar select section "Bot" +9. Press "Reset token" button and copy token. +10. Also enable all "Privileged Gateway Intents" ![discord-dev-enable-intents](images/api-configure/discord-dev-enable-intents.png) diff --git a/wiki/Setup.md b/wiki/Setup.md index 405d726..749083a 100644 --- a/wiki/Setup.md +++ b/wiki/Setup.md @@ -1,12 +1,12 @@ # ⚙️ Configure .env You can use Docker Compose or install all dependencies and source code locally. -But in both cases, you need to configure .env file. +But in both cases, you need to configure .env a file. Also you need retrieve token, client id and enable intents on Discord Developer Portal. - Create file .env.production (if you developer create .env.development) -- Fill all fields in .env.\* If the field is marked as (Optional), you can skip it. +- Fill all fields in .env.production If the field is marked as (Optional), you can skip it (don't include field in .env.production and don't set field to "undefined"). - (Required) To get Discord Token and enable intents, follow the [Discord Developer Portal](https://github.com/AlexInCube/AlCoTest/wiki/API-Configure#discord-developer-portal-required) section. - (Optional) To get YouTube cookies and bypass different errors with YouTube, follow the [YouTube](https://github.com/AlexInCube/AlCoTest/wiki/API-Configure#-youtube-cookie-optional) section - (Optional) To get Spotify Secret and ID, follow the [Spotify](https://github.com/AlexInCube/AlCoTest/wiki/API-Configure#spotify-optional) section. @@ -54,13 +54,18 @@ AICoTest/ ├─ yt-cookies.json ``` -- Run command `docker-compose up --detach --force-recreate` from folder with files +- Copy updateAndRunInDocker.sh (for Linux, Git Bash and terminals) or updateAndRunInDocker.bat for Windows +- Run command `sh updateAndRunInDocker.sh` for terminals or run updateAndRunInDocker.bat on Windows > [!NOTE] > If you use terminal, Linux or Git Bash etc..., > you can copy runInDocker.sh or updateAndRunInDocker.sh to folder with other files. > And run command `sh updateAndRunInDocker.sh` to update bot image and restart containers. +> [!NOTE] +> If you run Docker Desktop on Windows +> you can copy + # 🖥️ Run locally (if you are not a developer, this way is no sense) - Install [Node.js 22](https://nodejs.org/en/download/prebuilt-installer) or higher diff --git a/wiki/images/api-configure/discord-dev-installation-setup.png b/wiki/images/api-configure/discord-dev-installation-setup.png new file mode 100644 index 0000000..f2e30ff Binary files /dev/null and b/wiki/images/api-configure/discord-dev-installation-setup.png differ