Skip to content

Commit

Permalink
3.2.1
Browse files Browse the repository at this point in the history
Fixes to cookie fetching.
Removed watchtower from docker-compose.yml
  • Loading branch information
AlexInCube committed Jul 22, 2024
1 parent 00587b9 commit 48400be
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ node_modules
runInDocker.*
yt-cookies.json
wiki
build
2 changes: 2 additions & 0 deletions .github/workflows/publish-docker-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
paths-ignore:
- '**/wiki/**'
- '/wiki/**'
- 'docker-compose.yml'
- '.env'

env:
IMAGE_TAG: alexincube/aicotest
Expand Down
6 changes: 0 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,3 @@ services:
- aicbot-mongo
depends_on:
- aicbot-mongo
aicbot-watchtower:
image: containrrr/watchtower
container_name: aicbot-watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command: --interval 3600 aicbot-bot
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aicbot",
"version": "3.2.0",
"version": "3.2.1",
"description": "Discord Bot for playing music",
"main": "build/main.js",
"scripts": {
Expand Down
10 changes: 8 additions & 2 deletions src/CookiesAutomation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,19 @@ export async function getYoutubeCookie() {
}

const cookies = await page.cookies();

await browser.close();

if (cookies.length < 10) {
loggerError('Something went wrong during authentication to Google');
return undefined;
}

const cookiesJson = JSON.stringify(cookies, null, 2);
fs.writeFileSync('yt-cookies.json', cookiesJson);

//loggerSend(cookiesJson);

await browser.close();

if (!cookies) loggerError('Failed to fetch YouTube cookies');
if (cookiesJson) loggerSend('YouTube Cookies fetched successfully');

Expand Down
3 changes: 0 additions & 3 deletions wiki/Setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ Also you need retrieve token, client id and enable intents on Discord Developer

# 🐋 Run in Docker (recommended)

> [!NOTE]
> Using Docker provides the auto-update feature
- Install [Docker](https://www.docker.com/get-started/)
- Copy docker-compose.yml, Dockerfile in empty folder
- Follow the [Configure .env](#-configure-env) section and copy .env.production in folder with docker-compose.yml etc.
Expand Down

0 comments on commit 48400be

Please sign in to comment.