Skip to content

Commit

Permalink
Update the wiki page about discord token and Docker running.
Browse files Browse the repository at this point in the history
Added updateAndRunInDocker script for Windows.
  • Loading branch information
AlexInCube committed Sep 22, 2024
1 parent 4ae0359 commit 059a17d
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 22 deletions.
30 changes: 15 additions & 15 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 4 additions & 0 deletions updateAndRunInDocker.bat
Original file line number Diff line number Diff line change
@@ -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
16 changes: 12 additions & 4 deletions wiki/API-Configure.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
11 changes: 8 additions & 3 deletions wiki/Setup.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 059a17d

Please sign in to comment.