From 7489adcabd3849adf5db2289ff1cda47e7406dc2 Mon Sep 17 00:00:00 2001 From: hwangsihu Date: Fri, 2 Aug 2024 08:27:57 +0900 Subject: [PATCH 1/6] Updated packages --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 52b01fead..3821cadec 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "devDependencies": { "@biomejs/biome": "^1.8.3", "@types/i18n": "^0.13.12", - "@types/node": "^22.0.0", + "@types/node": "^22.0.2", "@types/signale": "^1.4.7", "prisma": "^5.17.0", "typescript": "^5.5.4" @@ -52,7 +52,7 @@ "signale": "^1.4.0", "topgg-autoposter": "^2.0.2", "tslib": "^2.6.3", - "undici": "^6.19.4" + "undici": "^6.19.5" }, "signale": { "displayScope": true, From 57bb184f727dd1ed51470876e527acf573d924a5 Mon Sep 17 00:00:00 2001 From: hwangsihu Date: Fri, 2 Aug 2024 08:29:23 +0900 Subject: [PATCH 2/6] Code formatting and removed console log --- src/commands/music/Play.ts | 2 +- src/events/client/Ready.ts | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/commands/music/Play.ts b/src/commands/music/Play.ts index ad7ab383d..9d01b4602 100644 --- a/src/commands/music/Play.ts +++ b/src/commands/music/Play.ts @@ -70,7 +70,7 @@ export default class Play extends Command { const track = player.buildTrack(res.data, ctx.author); if (player.queue.length > client.config.maxQueueSize) return await ctx.editMessage({ - content: "", + content: "", embeds: [ embed .setColor(this.client.color.red) diff --git a/src/events/client/Ready.ts b/src/events/client/Ready.ts index 4ee5ac82a..ac45ae9d1 100644 --- a/src/events/client/Ready.ts +++ b/src/events/client/Ready.ts @@ -25,9 +25,7 @@ export default class Ready extends Event { if (config.topGG) { const autoPoster = AutoPoster(config.topGG, this.client); setInterval(() => { - autoPoster.on("posted", (stats) => { - console.log(`[INFO] Posted stats to Top.gg | ${stats.serverCount} servers`); - }); + autoPoster.on("posted", (_stats) => {}); }, 86400000); // 24 hours in milliseconds } else { this.client.logger.warn("Top.gg token not found. Skipping auto poster."); From d41e9f0b914f12dbd8be0a3844e533f660034bcb Mon Sep 17 00:00:00 2001 From: hwangsihu Date: Fri, 2 Aug 2024 08:41:57 +0900 Subject: [PATCH 3/6] Changed language order --- src/types.ts | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/types.ts b/src/types.ts index 0054eeae7..47fb2b9fe 100644 --- a/src/types.ts +++ b/src/types.ts @@ -10,15 +10,6 @@ export enum SearchEngine { } export enum Language { - Indonesian = "Indonesian", - EnglishUS = "EnglishUS", - Hindi = "Hindi", - Polish = "Polish", - Korean = "Korean", - French = "French", - German = "German", - SpanishES = "SpanishES", - EnglishGB = "EnglishGB", Bulgarian = "Bulgarian", ChineseCN = "ChineseCN", ChineseTW = "ChineseTW", @@ -26,16 +17,25 @@ export enum Language { Czech = "Czech", Danish = "Danish", Dutch = "Dutch", + EnglishGB = "EnglishGB", + EnglishUS = "EnglishUS", Finnish = "Finnish", + French = "French", + German = "German", Greek = "Greek", + Hindi = "Hindi", Hungarian = "Hungarian", + Indonesian = "Indonesian", Italian = "Italian", Japanese = "Japanese", + Korean = "Korean", Lithuanian = "Lithuanian", Norwegian = "Norwegian", + Polish = "Polish", PortugueseBR = "PortugueseBR", Romanian = "Romanian", Russian = "Russian", + SpanishES = "SpanishES", Swedish = "Swedish", Thai = "Thai", Turkish = "Turkish", @@ -43,9 +43,6 @@ export enum Language { Vietnamese = "Vietnamese", } export const LocaleFlags = { - [Language.Indonesian]: "🇮🇩", - [Language.EnglishUS]: "🇺🇸", - [Language.EnglishGB]: "🇬🇧", [Language.Bulgarian]: "🇧🇬", [Language.ChineseCN]: "🇨🇳", [Language.ChineseTW]: "🇹🇼", @@ -53,12 +50,15 @@ export const LocaleFlags = { [Language.Czech]: "🇨🇿", [Language.Danish]: "🇩🇰", [Language.Dutch]: "🇳🇱", + [Language.EnglishGB]: "🇬🇧", + [Language.EnglishUS]: "🇺🇸", [Language.Finnish]: "🇫🇮", [Language.French]: "🇫🇷", [Language.German]: "🇩🇪", [Language.Greek]: "🇬🇷", [Language.Hindi]: "🇮🇳", [Language.Hungarian]: "🇭🇺", + [Language.Indonesian]: "🇮🇩", [Language.Italian]: "🇮🇹", [Language.Japanese]: "🇯🇵", [Language.Korean]: "🇰🇷", @@ -75,6 +75,7 @@ export const LocaleFlags = { [Language.Ukrainian]: "🇺🇦", [Language.Vietnamese]: "🇻🇳", }; + /** * Project: lavamusic * Author: Appu From c0a8ea83f140cd0d2056f4bb22fd2f5704859d3c Mon Sep 17 00:00:00 2001 From: hwangsihu <129564966+hwangsihu@users.noreply.github.com> Date: Fri, 2 Aug 2024 16:47:57 +0900 Subject: [PATCH 4/6] example.application.yml --- Lavalink/example.application.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lavalink/example.application.yml b/Lavalink/example.application.yml index dc5b7f33a..c043ace92 100644 --- a/Lavalink/example.application.yml +++ b/Lavalink/example.application.yml @@ -101,7 +101,7 @@ lavalink: snapshot: false # set to true if you want to use snapshot builds. - dependency: "com.github.topi314.sponsorblock:sponsorblock-plugin:3.0.1" snapshot: false # set to true if you want to use snapshot builds. - - dependency: "dev.lavalink.youtube:youtube-plugin:1.5.0" + - dependency: "dev.lavalink.youtube:youtube-plugin:1.5.1" snapshot: false # set to true if you want to use snapshot builds. pluginsDir: './plugins' server: From 9e328e9889a0bdcc6edd7206ad016058f62c8453 Mon Sep 17 00:00:00 2001 From: hwangsihu <129564966+hwangsihu@users.noreply.github.com> Date: Fri, 2 Aug 2024 16:56:12 +0900 Subject: [PATCH 5/6] Create snyk-security.yml Signed-off-by: hwangsihu <129564966+hwangsihu@users.noreply.github.com> --- .github/workflows/snyk-security.yml | 79 +++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 .github/workflows/snyk-security.yml diff --git a/.github/workflows/snyk-security.yml b/.github/workflows/snyk-security.yml new file mode 100644 index 000000000..578dcae66 --- /dev/null +++ b/.github/workflows/snyk-security.yml @@ -0,0 +1,79 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +# A sample workflow which sets up Snyk to analyze the full Snyk platform (Snyk Open Source, Snyk Code, +# Snyk Container and Snyk Infrastructure as Code) +# The setup installs the Snyk CLI - for more details on the possible commands +# check https://docs.snyk.io/snyk-cli/cli-reference +# The results of Snyk Code are then uploaded to GitHub Security Code Scanning +# +# In order to use the Snyk Action you will need to have a Snyk API token. +# More details in https://github.com/snyk/actions#getting-your-snyk-token +# or you can signup for free at https://snyk.io/login +# +# For more examples, including how to limit scans to only high-severity issues +# and fail PR checks, see https://github.com/snyk/actions/ + +name: Snyk Security + +on: + push: + branches: ["main" ] + pull_request: + branches: ["main"] + +permissions: + contents: read + +jobs: + snyk: + permissions: + contents: read # for actions/checkout to fetch code + security-events: write # for github/codeql-action/upload-sarif to upload SARIF results + actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Snyk CLI to check for security issues + # Snyk can be used to break the build when it detects security issues. + # In this case we want to upload the SAST issues to GitHub Code Scanning + uses: snyk/actions/setup@806182742461562b67788a64410098c9d9b96adb + + # For Snyk Open Source you must first set up the development environment for your application's dependencies + # For example for Node + #- uses: actions/setup-node@v4 + # with: + # node-version: 20 + + env: + # This is where you will need to introduce the Snyk API token created with your Snyk account + SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} + + # Runs Snyk Code (SAST) analysis and uploads result into GitHub. + # Use || true to not fail the pipeline + - name: Snyk Code test + run: snyk code test --sarif > snyk-code.sarif # || true + + # Runs Snyk Open Source (SCA) analysis and uploads result to Snyk. + - name: Snyk Open Source monitor + run: snyk monitor --all-projects + + # Runs Snyk Infrastructure as Code (IaC) analysis and uploads result to Snyk. + # Use || true to not fail the pipeline. + - name: Snyk IaC test and report + run: snyk iac test --report # || true + + # Build the docker image for testing + - name: Build a Docker image + run: docker build -t your/image-to-test . + # Runs Snyk Container (Container and SCA) analysis and uploads result to Snyk. + - name: Snyk Container monitor + run: snyk container monitor your/image-to-test --file=Dockerfile + + # Push the Snyk Code results into GitHub Code Scanning tab + - name: Upload result to GitHub Code Scanning + uses: github/codeql-action/upload-sarif@v3 + with: + sarif_file: snyk-code.sarif From ce3ac90dee8805419440be8ad8aa5fc2891b79f4 Mon Sep 17 00:00:00 2001 From: hwangsihu <129564966+hwangsihu@users.noreply.github.com> Date: Fri, 2 Aug 2024 17:00:27 +0900 Subject: [PATCH 6/6] Delete snyk-security.yml Signed-off-by: hwangsihu <129564966+hwangsihu@users.noreply.github.com> --- .github/workflows/snyk-security.yml | 79 ----------------------------- 1 file changed, 79 deletions(-) delete mode 100644 .github/workflows/snyk-security.yml diff --git a/.github/workflows/snyk-security.yml b/.github/workflows/snyk-security.yml deleted file mode 100644 index 578dcae66..000000000 --- a/.github/workflows/snyk-security.yml +++ /dev/null @@ -1,79 +0,0 @@ -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. - -# A sample workflow which sets up Snyk to analyze the full Snyk platform (Snyk Open Source, Snyk Code, -# Snyk Container and Snyk Infrastructure as Code) -# The setup installs the Snyk CLI - for more details on the possible commands -# check https://docs.snyk.io/snyk-cli/cli-reference -# The results of Snyk Code are then uploaded to GitHub Security Code Scanning -# -# In order to use the Snyk Action you will need to have a Snyk API token. -# More details in https://github.com/snyk/actions#getting-your-snyk-token -# or you can signup for free at https://snyk.io/login -# -# For more examples, including how to limit scans to only high-severity issues -# and fail PR checks, see https://github.com/snyk/actions/ - -name: Snyk Security - -on: - push: - branches: ["main" ] - pull_request: - branches: ["main"] - -permissions: - contents: read - -jobs: - snyk: - permissions: - contents: read # for actions/checkout to fetch code - security-events: write # for github/codeql-action/upload-sarif to upload SARIF results - actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up Snyk CLI to check for security issues - # Snyk can be used to break the build when it detects security issues. - # In this case we want to upload the SAST issues to GitHub Code Scanning - uses: snyk/actions/setup@806182742461562b67788a64410098c9d9b96adb - - # For Snyk Open Source you must first set up the development environment for your application's dependencies - # For example for Node - #- uses: actions/setup-node@v4 - # with: - # node-version: 20 - - env: - # This is where you will need to introduce the Snyk API token created with your Snyk account - SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} - - # Runs Snyk Code (SAST) analysis and uploads result into GitHub. - # Use || true to not fail the pipeline - - name: Snyk Code test - run: snyk code test --sarif > snyk-code.sarif # || true - - # Runs Snyk Open Source (SCA) analysis and uploads result to Snyk. - - name: Snyk Open Source monitor - run: snyk monitor --all-projects - - # Runs Snyk Infrastructure as Code (IaC) analysis and uploads result to Snyk. - # Use || true to not fail the pipeline. - - name: Snyk IaC test and report - run: snyk iac test --report # || true - - # Build the docker image for testing - - name: Build a Docker image - run: docker build -t your/image-to-test . - # Runs Snyk Container (Container and SCA) analysis and uploads result to Snyk. - - name: Snyk Container monitor - run: snyk container monitor your/image-to-test --file=Dockerfile - - # Push the Snyk Code results into GitHub Code Scanning tab - - name: Upload result to GitHub Code Scanning - uses: github/codeql-action/upload-sarif@v3 - with: - sarif_file: snyk-code.sarif