Merge pull request #908 from warengroup/develop

Version 0.5.4
This commit is contained in:
Christer Warén 2023-12-21 02:07:42 +02:00 committed by GitHub
commit 75f5d57ad0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 204 additions and 264 deletions

View File

@ -1,5 +1,5 @@
DISCORD_TOKEN= DISCORD_TOKEN=
RADIOX_STATIONSLISTURL=https://git.cwinfo.net/cwchristerw/radio/raw/branch/master/playlist.json RADIOX_STATIONSLISTURL=https://eximiabots.waren.io/radiox/stations.json
DEV_MODE=false DEV_MODE=false
DEBUG_MODE=false DEBUG_MODE=false
STREAMER_MODE=manual STREAMER_MODE=manual

16
.github/labeler.yml vendored
View File

@ -1,9 +1,13 @@
dependencies: dependencies:
- package-lock.json - changed-files:
- any-glob-to-any-file:
- package-lock.json
documentation: documentation:
- README.md - changed-files:
- SECURITY.md - any-glob-to-any-file:
- CONTRIBUTING.md - README.md
- LICENSE - SECURITY.md
- .env_example - CONTRIBUTING.md
- LICENSE
- .env_example

View File

@ -43,7 +43,7 @@ jobs:
# Initializes the CodeQL tools for scanning. # Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL - name: Initialize CodeQL
uses: github/codeql-action/init@v2 uses: github/codeql-action/init@v3
with: with:
languages: ${{ matrix.language }} languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file. # If you wish to specify custom queries, you can do so here or in a config file.
@ -54,7 +54,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below) # If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild - name: Autobuild
uses: github/codeql-action/autobuild@v2 uses: github/codeql-action/autobuild@v3
# Command-line programs to run using the OS shell. # Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl # 📚 https://git.io/JvXDl
@ -68,4 +68,4 @@ jobs:
# make release # make release
- name: Perform CodeQL Analysis - name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2 uses: github/codeql-action/analyze@v3

View File

@ -11,7 +11,7 @@ jobs:
pull-requests: write pull-requests: write
steps: steps:
- uses: actions/labeler@v4 - uses: actions/labeler@v5
with: with:
repo-token: "${{ secrets.GITHUB_TOKEN }}" repo-token: "${{ secrets.GITHUB_TOKEN }}"
sync-labels: true sync-labels: true

View File

@ -1,4 +1,4 @@
FROM node:18-alpine FROM node:20-alpine
#Dependencies #Dependencies
RUN apk add --virtual .build-deps python3 make g++ gcc git RUN apk add --virtual .build-deps python3 make g++ gcc git

269
package-lock.json generated
View File

@ -1,37 +1,37 @@
{ {
"name": "eximiabots-radiox", "name": "eximiabots-radiox",
"version": "0.5.3", "version": "0.5.4",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "eximiabots-radiox", "name": "eximiabots-radiox",
"version": "0.5.3", "version": "0.5.4",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@discordjs/builders": "^1.7.0", "@discordjs/builders": "^1.7.0",
"@discordjs/opus": "^0.9.0", "@discordjs/opus": "^0.9.0",
"@discordjs/rest": "^2.2.0", "@discordjs/rest": "^2.2.0",
"@discordjs/voice": "^0.16.1", "@discordjs/voice": "^0.16.1",
"discord-api-types": "^0.37.65", "discord-api-types": "^0.37.66",
"discord.js": "^14.14.1", "discord.js": "^14.14.1",
"dotenv": "^16.3.1", "dotenv": "^16.3.1",
"libsodium-wrappers": "^0.7.13", "libsodium-wrappers": "^0.7.13",
"path": "^0.12.7" "path": "^0.12.7"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^20.10.0", "@types/node": "^20.10.5",
"@types/ws": "^8.5.9", "@types/ws": "^8.5.9",
"@typescript-eslint/eslint-plugin": "^6.13.1", "@typescript-eslint/eslint-plugin": "^6.15.0",
"@typescript-eslint/parser": "^6.13.1", "@typescript-eslint/parser": "^6.15.0",
"eslint": "^8.54.0", "eslint": "^8.55.0",
"eslint-config-prettier": "^9.0.0", "eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.0.1", "eslint-plugin-prettier": "^5.1.0",
"prettier": "^3.1.0", "prettier": "^3.1.1",
"rimraf": "^5.0.5", "rimraf": "^5.0.5",
"ts-node": "^10.9.1", "ts-node": "^10.9.2",
"tsc-watch": "^6.0.4", "tsc-watch": "^6.0.4",
"typescript": "^5.2.2" "typescript": "^5.3.3"
}, },
"engines": { "engines": {
"node": ">=18.16.0", "node": ">=18.16.0",
@ -271,9 +271,9 @@
} }
}, },
"node_modules/@eslint/eslintrc": { "node_modules/@eslint/eslintrc": {
"version": "2.1.3", "version": "2.1.4",
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.3.tgz", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz",
"integrity": "sha512-yZzuIG+jnVu6hNSzFEN07e8BxF3uAzYtQb6uDkaYZLo6oYZDCq454c5kB8zxnzfCYyP4MIuyBn10L0DqwujTmA==", "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"ajv": "^6.12.4", "ajv": "^6.12.4",
@ -294,9 +294,9 @@
} }
}, },
"node_modules/@eslint/js": { "node_modules/@eslint/js": {
"version": "8.54.0", "version": "8.56.0",
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.54.0.tgz", "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz",
"integrity": "sha512-ut5V+D+fOoWPgGGNj83GGjnntO39xDy6DWxO0wb7Jp3DcMX0TfIqdzHF85VTQkerdyGmuuMD9AKAo5KiNlf/AQ==", "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==",
"dev": true, "dev": true,
"engines": { "engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0" "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@ -501,31 +501,30 @@
} }
}, },
"node_modules/@sapphire/async-queue": { "node_modules/@sapphire/async-queue": {
"version": "1.5.0", "version": "1.5.1",
"resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.5.0.tgz", "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.5.1.tgz",
"integrity": "sha512-JkLdIsP8fPAdh9ZZjrbHWR/+mZj0wvKS5ICibcLrRI1j84UmLMshx5n9QmL8b95d4onJ2xxiyugTgSAX7AalmA==", "integrity": "sha512-1RdpsmDQR/aWfp8oJzPtn4dNQrbpqSL5PIA0uAB/XwerPXUf994Ug1au1e7uGcD7ei8/F63UDjr5GWps1g/HxQ==",
"engines": { "engines": {
"node": ">=v14.0.0", "node": ">=v14.0.0",
"npm": ">=7.0.0" "npm": ">=7.0.0"
} }
}, },
"node_modules/@sapphire/shapeshift": { "node_modules/@sapphire/shapeshift": {
"version": "3.9.3", "version": "3.9.5",
"resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.9.3.tgz", "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.9.5.tgz",
"integrity": "sha512-WzKJSwDYloSkHoBbE8rkRW8UNKJiSRJ/P8NqJ5iVq7U2Yr/kriIBx2hW+wj2Z5e5EnXL1hgYomgaFsdK6b+zqQ==", "integrity": "sha512-AGdHe+51gF7D3W8hBfuSFLBocURDCXVQczScTHXDS3RpNjNgrktIx/amlz5y8nHhm8SAdFt/X8EF8ZSfjJ0tnA==",
"dependencies": { "dependencies": {
"fast-deep-equal": "^3.1.3", "fast-deep-equal": "^3.1.3",
"lodash": "^4.17.21" "lodash": "^4.17.21"
}, },
"engines": { "engines": {
"node": ">=v14.0.0", "node": ">=v18"
"npm": ">=7.0.0"
} }
}, },
"node_modules/@sapphire/snowflake": { "node_modules/@sapphire/snowflake": {
"version": "3.5.1", "version": "3.5.2",
"resolved": "https://registry.npmjs.org/@sapphire/snowflake/-/snowflake-3.5.1.tgz", "resolved": "https://registry.npmjs.org/@sapphire/snowflake/-/snowflake-3.5.2.tgz",
"integrity": "sha512-BxcYGzgEsdlG0dKAyOm0ehLGm2CafIrfQTZGWgkfKYbj+pNNsorZ7EotuZukc2MT70E0UbppVbtpBrqpzVzjNA==", "integrity": "sha512-FTm9RdyELF21PQN5dS/HLRs90XqWclHa+p0gkonc+BA2X2QKfFySHSjUbO65rmArd/ghR9Ahj2fMfedTZEqzOw==",
"engines": { "engines": {
"node": ">=v14.0.0", "node": ">=v14.0.0",
"npm": ">=7.0.0" "npm": ">=7.0.0"
@ -562,9 +561,9 @@
"dev": true "dev": true
}, },
"node_modules/@types/node": { "node_modules/@types/node": {
"version": "20.10.0", "version": "20.10.5",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.0.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.5.tgz",
"integrity": "sha512-D0WfRmU9TQ8I9PFx9Yc+EBHw+vSpIub4IDvQivcp26PtPrdMGAq5SDcpXEo/epqa/DXotVpekHiLNTg3iaKXBQ==", "integrity": "sha512-nNPsNE65wjMxEKI93yOP+NPGGBJz/PoN3kZsVLee0XMiJolxSekEVD8wRwBUBqkwc7UWop0edW50yrCQW4CyRw==",
"dependencies": { "dependencies": {
"undici-types": "~5.26.4" "undici-types": "~5.26.4"
} }
@ -584,16 +583,16 @@
} }
}, },
"node_modules/@typescript-eslint/eslint-plugin": { "node_modules/@typescript-eslint/eslint-plugin": {
"version": "6.13.1", "version": "6.15.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.13.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.15.0.tgz",
"integrity": "sha512-5bQDGkXaxD46bPvQt08BUz9YSaO4S0fB1LB5JHQuXTfkGPI3+UUeS387C/e9jRie5GqT8u5kFTrMvAjtX4O5kA==", "integrity": "sha512-j5qoikQqPccq9QoBAupOP+CBu8BaJ8BLjaXSioDISeTZkVO3ig7oSIKh3H+rEpee7xCXtWwSB4KIL5l6hWZzpg==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@eslint-community/regexpp": "^4.5.1", "@eslint-community/regexpp": "^4.5.1",
"@typescript-eslint/scope-manager": "6.13.1", "@typescript-eslint/scope-manager": "6.15.0",
"@typescript-eslint/type-utils": "6.13.1", "@typescript-eslint/type-utils": "6.15.0",
"@typescript-eslint/utils": "6.13.1", "@typescript-eslint/utils": "6.15.0",
"@typescript-eslint/visitor-keys": "6.13.1", "@typescript-eslint/visitor-keys": "6.15.0",
"debug": "^4.3.4", "debug": "^4.3.4",
"graphemer": "^1.4.0", "graphemer": "^1.4.0",
"ignore": "^5.2.4", "ignore": "^5.2.4",
@ -619,15 +618,15 @@
} }
}, },
"node_modules/@typescript-eslint/parser": { "node_modules/@typescript-eslint/parser": {
"version": "6.13.1", "version": "6.15.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.13.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.15.0.tgz",
"integrity": "sha512-fs2XOhWCzRhqMmQf0eicLa/CWSaYss2feXsy7xBD/pLyWke/jCIVc2s1ikEAtSW7ina1HNhv7kONoEfVNEcdDQ==", "integrity": "sha512-MkgKNnsjC6QwcMdlNAel24jjkEO/0hQaMDLqP4S9zq5HBAUJNQB6y+3DwLjX7b3l2b37eNAxMPLwb3/kh8VKdA==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@typescript-eslint/scope-manager": "6.13.1", "@typescript-eslint/scope-manager": "6.15.0",
"@typescript-eslint/types": "6.13.1", "@typescript-eslint/types": "6.15.0",
"@typescript-eslint/typescript-estree": "6.13.1", "@typescript-eslint/typescript-estree": "6.15.0",
"@typescript-eslint/visitor-keys": "6.13.1", "@typescript-eslint/visitor-keys": "6.15.0",
"debug": "^4.3.4" "debug": "^4.3.4"
}, },
"engines": { "engines": {
@ -647,13 +646,13 @@
} }
}, },
"node_modules/@typescript-eslint/scope-manager": { "node_modules/@typescript-eslint/scope-manager": {
"version": "6.13.1", "version": "6.15.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.13.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.15.0.tgz",
"integrity": "sha512-BW0kJ7ceiKi56GbT2KKzZzN+nDxzQK2DS6x0PiSMPjciPgd/JRQGMibyaN2cPt2cAvuoH0oNvn2fwonHI+4QUQ==", "integrity": "sha512-+BdvxYBltqrmgCNu4Li+fGDIkW9n//NrruzG9X1vBzaNK+ExVXPoGB71kneaVw/Jp+4rH/vaMAGC6JfMbHstVg==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@typescript-eslint/types": "6.13.1", "@typescript-eslint/types": "6.15.0",
"@typescript-eslint/visitor-keys": "6.13.1" "@typescript-eslint/visitor-keys": "6.15.0"
}, },
"engines": { "engines": {
"node": "^16.0.0 || >=18.0.0" "node": "^16.0.0 || >=18.0.0"
@ -664,13 +663,13 @@
} }
}, },
"node_modules/@typescript-eslint/type-utils": { "node_modules/@typescript-eslint/type-utils": {
"version": "6.13.1", "version": "6.15.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.13.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.15.0.tgz",
"integrity": "sha512-A2qPlgpxx2v//3meMqQyB1qqTg1h1dJvzca7TugM3Yc2USDY+fsRBiojAEo92HO7f5hW5mjAUF6qobOPzlBCBQ==", "integrity": "sha512-CnmHKTfX6450Bo49hPg2OkIm/D/TVYV7jO1MCfPYGwf6x3GO0VU8YMO5AYMn+u3X05lRRxA4fWCz87GFQV6yVQ==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@typescript-eslint/typescript-estree": "6.13.1", "@typescript-eslint/typescript-estree": "6.15.0",
"@typescript-eslint/utils": "6.13.1", "@typescript-eslint/utils": "6.15.0",
"debug": "^4.3.4", "debug": "^4.3.4",
"ts-api-utils": "^1.0.1" "ts-api-utils": "^1.0.1"
}, },
@ -691,9 +690,9 @@
} }
}, },
"node_modules/@typescript-eslint/types": { "node_modules/@typescript-eslint/types": {
"version": "6.13.1", "version": "6.15.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.13.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.15.0.tgz",
"integrity": "sha512-gjeEskSmiEKKFIbnhDXUyiqVma1gRCQNbVZ1C8q7Zjcxh3WZMbzWVfGE9rHfWd1msQtPS0BVD9Jz9jded44eKg==", "integrity": "sha512-yXjbt//E4T/ee8Ia1b5mGlbNj9fB9lJP4jqLbZualwpP2BCQ5is6BcWwxpIsY4XKAhmdv3hrW92GdtJbatC6dQ==",
"dev": true, "dev": true,
"engines": { "engines": {
"node": "^16.0.0 || >=18.0.0" "node": "^16.0.0 || >=18.0.0"
@ -704,13 +703,13 @@
} }
}, },
"node_modules/@typescript-eslint/typescript-estree": { "node_modules/@typescript-eslint/typescript-estree": {
"version": "6.13.1", "version": "6.15.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.13.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.15.0.tgz",
"integrity": "sha512-sBLQsvOC0Q7LGcUHO5qpG1HxRgePbT6wwqOiGLpR8uOJvPJbfs0mW3jPA3ujsDvfiVwVlWUDESNXv44KtINkUQ==", "integrity": "sha512-7mVZJN7Hd15OmGuWrp2T9UvqR2Ecg+1j/Bp1jXUEY2GZKV6FXlOIoqVDmLpBiEiq3katvj/2n2mR0SDwtloCew==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@typescript-eslint/types": "6.13.1", "@typescript-eslint/types": "6.15.0",
"@typescript-eslint/visitor-keys": "6.13.1", "@typescript-eslint/visitor-keys": "6.15.0",
"debug": "^4.3.4", "debug": "^4.3.4",
"globby": "^11.1.0", "globby": "^11.1.0",
"is-glob": "^4.0.3", "is-glob": "^4.0.3",
@ -731,17 +730,17 @@
} }
}, },
"node_modules/@typescript-eslint/utils": { "node_modules/@typescript-eslint/utils": {
"version": "6.13.1", "version": "6.15.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.13.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.15.0.tgz",
"integrity": "sha512-ouPn/zVoan92JgAegesTXDB/oUp6BP1v8WpfYcqh649ejNc9Qv+B4FF2Ff626kO1xg0wWwwG48lAJ4JuesgdOw==", "integrity": "sha512-eF82p0Wrrlt8fQSRL0bGXzK5nWPRV2dYQZdajcfzOD9+cQz9O7ugifrJxclB+xVOvWvagXfqS4Es7vpLP4augw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@eslint-community/eslint-utils": "^4.4.0", "@eslint-community/eslint-utils": "^4.4.0",
"@types/json-schema": "^7.0.12", "@types/json-schema": "^7.0.12",
"@types/semver": "^7.5.0", "@types/semver": "^7.5.0",
"@typescript-eslint/scope-manager": "6.13.1", "@typescript-eslint/scope-manager": "6.15.0",
"@typescript-eslint/types": "6.13.1", "@typescript-eslint/types": "6.15.0",
"@typescript-eslint/typescript-estree": "6.13.1", "@typescript-eslint/typescript-estree": "6.15.0",
"semver": "^7.5.4" "semver": "^7.5.4"
}, },
"engines": { "engines": {
@ -756,12 +755,12 @@
} }
}, },
"node_modules/@typescript-eslint/visitor-keys": { "node_modules/@typescript-eslint/visitor-keys": {
"version": "6.13.1", "version": "6.15.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.13.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.15.0.tgz",
"integrity": "sha512-NDhQUy2tg6XGNBGDRm1XybOHSia8mcXmlbKWoQP+nm1BIIMxa55shyJfZkHpEBN62KNPLrocSM2PdPcaLgDKMQ==", "integrity": "sha512-1zvtdC1a9h5Tb5jU9x3ADNXO9yjP8rXlaoChu0DQX40vf5ACVpYIVIZhIMZ6d5sDXH7vq4dsZBT1fEGj8D2n2w==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@typescript-eslint/types": "6.13.1", "@typescript-eslint/types": "6.15.0",
"eslint-visitor-keys": "^3.4.1" "eslint-visitor-keys": "^3.4.1"
}, },
"engines": { "engines": {
@ -779,9 +778,9 @@
"dev": true "dev": true
}, },
"node_modules/@vladfrangu/async_event_emitter": { "node_modules/@vladfrangu/async_event_emitter": {
"version": "2.2.2", "version": "2.2.4",
"resolved": "https://registry.npmjs.org/@vladfrangu/async_event_emitter/-/async_event_emitter-2.2.2.tgz", "resolved": "https://registry.npmjs.org/@vladfrangu/async_event_emitter/-/async_event_emitter-2.2.4.tgz",
"integrity": "sha512-HIzRG7sy88UZjBJamssEczH5q7t5+axva19UbZLO6u0ySbYPrwzWiXBcC0WuHyhKKoeCyneH+FvYzKQq/zTtkQ==", "integrity": "sha512-ButUPz9E9cXMLgvAW8aLAKKJJsPu1dY1/l/E8xzLFuysowXygs6GBcyunK9rnGC4zTsnIc2mQo71rGw9U+Ykug==",
"engines": { "engines": {
"node": ">=v14.0.0", "node": ">=v14.0.0",
"npm": ">=7.0.0" "npm": ">=7.0.0"
@ -814,9 +813,9 @@
} }
}, },
"node_modules/acorn-walk": { "node_modules/acorn-walk": {
"version": "8.3.0", "version": "8.3.1",
"resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.0.tgz", "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.1.tgz",
"integrity": "sha512-FS7hV565M5l1R08MXqo8odwMTB02C2UqzB17RVgu9EyuYFBqJZ3/ZY97sQD5FewVu1UyDFc1yztUDrAwT0EypA==", "integrity": "sha512-TgUZgYvqZprrl7YldZNoa9OciCAyZR+Ejm9eXzKCmjsF5IKp/wgQ7Z/ZpjpGTIUPwrHQIcYeI8qDh4PsEwxMbw==",
"dev": true, "dev": true,
"engines": { "engines": {
"node": ">=0.4.0" "node": ">=0.4.0"
@ -1164,9 +1163,9 @@
} }
}, },
"node_modules/discord-api-types": { "node_modules/discord-api-types": {
"version": "0.37.65", "version": "0.37.66",
"resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.65.tgz", "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.66.tgz",
"integrity": "sha512-CQHW3Nu04LEHIj1Xps/sfGhTdrowilxnek2tirpLhwvrmgmLr1C6A+4JFLs+0kJMH2IX2QgDyA9GfNehqN+xPQ==" "integrity": "sha512-3Q+6uBODmVaPAmZZ1jYQiQBbp0hqArgSU9Y6DuYY6KW5Sdij91bwbmFnnVI5XvATRkY+Wk9KMBWFzAEwSDs+1w=="
}, },
"node_modules/discord.js": { "node_modules/discord.js": {
"version": "14.14.1", "version": "14.14.1",
@ -1200,6 +1199,15 @@
"node": ">=16.11.0" "node": ">=16.11.0"
} }
}, },
"node_modules/discord.js/node_modules/@sapphire/snowflake": {
"version": "3.5.1",
"resolved": "https://registry.npmjs.org/@sapphire/snowflake/-/snowflake-3.5.1.tgz",
"integrity": "sha512-BxcYGzgEsdlG0dKAyOm0ehLGm2CafIrfQTZGWgkfKYbj+pNNsorZ7EotuZukc2MT70E0UbppVbtpBrqpzVzjNA==",
"engines": {
"node": ">=v14.0.0",
"npm": ">=7.0.0"
}
},
"node_modules/discord.js/node_modules/@types/ws": { "node_modules/discord.js/node_modules/@types/ws": {
"version": "8.5.9", "version": "8.5.9",
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.9.tgz", "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.9.tgz",
@ -1213,6 +1221,26 @@
"resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.61.tgz", "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.61.tgz",
"integrity": "sha512-o/dXNFfhBpYHpQFdT6FWzeO7pKc838QeeZ9d91CfVAtpr5XLK4B/zYxQbYgPdoMiTDvJfzcsLW5naXgmHGDNXw==" "integrity": "sha512-o/dXNFfhBpYHpQFdT6FWzeO7pKc838QeeZ9d91CfVAtpr5XLK4B/zYxQbYgPdoMiTDvJfzcsLW5naXgmHGDNXw=="
}, },
"node_modules/discord.js/node_modules/ws": {
"version": "8.14.2",
"resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz",
"integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==",
"engines": {
"node": ">=10.0.0"
},
"peerDependencies": {
"bufferutil": "^4.0.1",
"utf-8-validate": ">=5.0.2"
},
"peerDependenciesMeta": {
"bufferutil": {
"optional": true
},
"utf-8-validate": {
"optional": true
}
}
},
"node_modules/doctrine": { "node_modules/doctrine": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz",
@ -1266,15 +1294,15 @@
} }
}, },
"node_modules/eslint": { "node_modules/eslint": {
"version": "8.54.0", "version": "8.56.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.54.0.tgz", "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz",
"integrity": "sha512-NY0DfAkM8BIZDVl6PgSa1ttZbx3xHgJzSNJKYcQglem6CppHyMhRIQkBVSSMaSRnLhig3jsDbEzOjwCVt4AmmA==", "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/eslint-utils": "^4.2.0",
"@eslint-community/regexpp": "^4.6.1", "@eslint-community/regexpp": "^4.6.1",
"@eslint/eslintrc": "^2.1.3", "@eslint/eslintrc": "^2.1.4",
"@eslint/js": "8.54.0", "@eslint/js": "8.56.0",
"@humanwhocodes/config-array": "^0.11.13", "@humanwhocodes/config-array": "^0.11.13",
"@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/module-importer": "^1.0.1",
"@nodelib/fs.walk": "^1.2.8", "@nodelib/fs.walk": "^1.2.8",
@ -1321,9 +1349,9 @@
} }
}, },
"node_modules/eslint-config-prettier": { "node_modules/eslint-config-prettier": {
"version": "9.0.0", "version": "9.1.0",
"resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.0.0.tgz", "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz",
"integrity": "sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw==", "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==",
"dev": true, "dev": true,
"bin": { "bin": {
"eslint-config-prettier": "bin/cli.js" "eslint-config-prettier": "bin/cli.js"
@ -1333,9 +1361,9 @@
} }
}, },
"node_modules/eslint-plugin-prettier": { "node_modules/eslint-plugin-prettier": {
"version": "5.0.1", "version": "5.1.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.0.1.tgz", "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.1.0.tgz",
"integrity": "sha512-m3u5RnR56asrwV/lDC4GHorlW75DsFfmUcjfCYylTUs85dBRnB7VM6xG8eCMJdeDRnppzmxZVf1GEPJvl1JmNg==", "integrity": "sha512-hQc+2zbnMeXcIkg+pKZtVa+3Yqx4WY7SMkn1PLZ4VbBEU7jJIpVn9347P8BBhTbz6ne85aXvQf30kvexcqBeWw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"prettier-linter-helpers": "^1.0.0", "prettier-linter-helpers": "^1.0.0",
@ -1350,6 +1378,7 @@
"peerDependencies": { "peerDependencies": {
"@types/eslint": ">=8.0.0", "@types/eslint": ">=8.0.0",
"eslint": ">=8.0.0", "eslint": ">=8.0.0",
"eslint-config-prettier": "*",
"prettier": ">=3.0.0" "prettier": ">=3.0.0"
}, },
"peerDependenciesMeta": { "peerDependenciesMeta": {
@ -1538,9 +1567,9 @@
"dev": true "dev": true
}, },
"node_modules/fastq": { "node_modules/fastq": {
"version": "1.15.0", "version": "1.16.0",
"resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.16.0.tgz",
"integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", "integrity": "sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"reusify": "^1.0.4" "reusify": "^1.0.4"
@ -1792,9 +1821,9 @@
} }
}, },
"node_modules/globals": { "node_modules/globals": {
"version": "13.23.0", "version": "13.24.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz", "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz",
"integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==", "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"type-fest": "^0.20.2" "type-fest": "^0.20.2"
@ -2164,9 +2193,9 @@
} }
}, },
"node_modules/magic-bytes.js": { "node_modules/magic-bytes.js": {
"version": "1.5.0", "version": "1.7.0",
"resolved": "https://registry.npmjs.org/magic-bytes.js/-/magic-bytes.js-1.5.0.tgz", "resolved": "https://registry.npmjs.org/magic-bytes.js/-/magic-bytes.js-1.7.0.tgz",
"integrity": "sha512-wJkXvutRbNWcc37tt5j1HyOK1nosspdh3dj6LUYYAvF6JYNqs53IfRvK9oEpcwiDA1NdoIi64yAMfdivPeVAyw==" "integrity": "sha512-YzVU2+/hrjwx8xcgAw+ffNq3jkactpj+f1iSL4LonrFKhvnwDzHSqtFdk/MMRP53y9ScouJ7cKEnqYsJwsHoYA=="
}, },
"node_modules/make-dir": { "node_modules/make-dir": {
"version": "3.1.0", "version": "3.1.0",
@ -2594,9 +2623,9 @@
} }
}, },
"node_modules/prettier": { "node_modules/prettier": {
"version": "3.1.0", "version": "3.1.1",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.0.tgz", "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.1.tgz",
"integrity": "sha512-TQLvXjq5IAibjh8EpBIkNKxO749UEWABoiIZehEPiY4GNpVdhaFKqSTu+QrlU6D2dPAfubRmtJTi4K4YkQ5eXw==", "integrity": "sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==",
"dev": true, "dev": true,
"bin": { "bin": {
"prettier": "bin/prettier.cjs" "prettier": "bin/prettier.cjs"
@ -3085,13 +3114,13 @@
} }
}, },
"node_modules/synckit": { "node_modules/synckit": {
"version": "0.8.5", "version": "0.8.6",
"resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.5.tgz", "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.6.tgz",
"integrity": "sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q==", "integrity": "sha512-laHF2savN6sMeHCjLRkheIU4wo3Zg9Ln5YOjOo7sZ5dVQW8yF5pPE5SIw1dsPhq3TRp1jisKRCdPhfs/1WMqDA==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@pkgr/utils": "^2.3.1", "@pkgr/utils": "^2.4.2",
"tslib": "^2.5.0" "tslib": "^2.6.2"
}, },
"engines": { "engines": {
"node": "^14.18.0 || >=16.0.0" "node": "^14.18.0 || >=16.0.0"
@ -3183,9 +3212,9 @@
"integrity": "sha512-k43M7uCG1AkTyxgnmI5MPwKoUvS/bRvLvUb7+Pgpdlmok8AoqmUaZxUUw8zKM5B1lqZrt41GjYgnvAi0fppqgQ==" "integrity": "sha512-k43M7uCG1AkTyxgnmI5MPwKoUvS/bRvLvUb7+Pgpdlmok8AoqmUaZxUUw8zKM5B1lqZrt41GjYgnvAi0fppqgQ=="
}, },
"node_modules/ts-node": { "node_modules/ts-node": {
"version": "10.9.1", "version": "10.9.2",
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz",
"integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@cspotcode/source-map-support": "^0.8.0", "@cspotcode/source-map-support": "^0.8.0",
@ -3276,9 +3305,9 @@
} }
}, },
"node_modules/typescript": { "node_modules/typescript": {
"version": "5.3.2", "version": "5.3.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.2.tgz", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz",
"integrity": "sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ==", "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==",
"dev": true, "dev": true,
"bin": { "bin": {
"tsc": "bin/tsc", "tsc": "bin/tsc",
@ -3486,9 +3515,9 @@
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
}, },
"node_modules/ws": { "node_modules/ws": {
"version": "8.14.2", "version": "8.15.1",
"resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz", "resolved": "https://registry.npmjs.org/ws/-/ws-8.15.1.tgz",
"integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==", "integrity": "sha512-W5OZiCjXEmk0yZ66ZN82beM5Sz7l7coYxpRkzS+p9PP+ToQry8szKh+61eNktr7EA9DOwvFGhfC605jDHbP6QQ==",
"engines": { "engines": {
"node": ">=10.0.0" "node": ">=10.0.0"
}, },

View File

@ -1,6 +1,6 @@
{ {
"name": "eximiabots-radiox", "name": "eximiabots-radiox",
"version": "0.5.3", "version": "0.5.4",
"description": "Internet Radio to your Discord guild", "description": "Internet Radio to your Discord guild",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
@ -22,25 +22,25 @@
"@discordjs/opus": "^0.9.0", "@discordjs/opus": "^0.9.0",
"@discordjs/rest": "^2.2.0", "@discordjs/rest": "^2.2.0",
"@discordjs/voice": "^0.16.1", "@discordjs/voice": "^0.16.1",
"discord-api-types": "^0.37.65", "discord-api-types": "^0.37.66",
"discord.js": "^14.14.1", "discord.js": "^14.14.1",
"dotenv": "^16.3.1", "dotenv": "^16.3.1",
"libsodium-wrappers": "^0.7.13", "libsodium-wrappers": "^0.7.13",
"path": "^0.12.7" "path": "^0.12.7"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^20.10.0", "@types/node": "^20.10.5",
"@types/ws": "^8.5.9", "@types/ws": "^8.5.9",
"@typescript-eslint/eslint-plugin": "^6.13.1", "@typescript-eslint/eslint-plugin": "^6.15.0",
"@typescript-eslint/parser": "^6.13.1", "@typescript-eslint/parser": "^6.15.0",
"eslint": "^8.54.0", "eslint": "^8.55.0",
"eslint-config-prettier": "^9.0.0", "eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.0.1", "eslint-plugin-prettier": "^5.1.0",
"prettier": "^3.1.0", "prettier": "^3.1.1",
"rimraf": "^5.0.5", "rimraf": "^5.0.5",
"ts-node": "^10.9.1", "ts-node": "^10.9.2",
"tsc-watch": "^6.0.4", "tsc-watch": "^6.0.4",
"typescript": "^5.2.2" "typescript": "^5.3.3"
}, },
"engines": { "engines": {
"node": ">=18.16.0", "node": ">=18.16.0",

View File

@ -51,15 +51,13 @@ export default class Streamer {
if(this.mode == "auto"){ if(this.mode == "auto"){
audioPlayer = createAudioPlayer({ audioPlayer = createAudioPlayer({
behaviors: { behaviors: {
noSubscriber: NoSubscriberBehavior.Play, noSubscriber: NoSubscriberBehavior.Play
maxMissedFrames: Math.round(5000 / 20),
} }
}); });
} else { } else {
audioPlayer = createAudioPlayer({ audioPlayer = createAudioPlayer({
behaviors: { behaviors: {
noSubscriber: NoSubscriberBehavior.Stop, noSubscriber: NoSubscriberBehavior.Stop
maxMissedFrames: Math.round(5000 / 20),
} }
}); });
} }

View File

@ -1,8 +1,6 @@
import { Snowflake } from "discord.js"; import { ApplicationCommand, ApplicationCommandManager, BaseGuild, Guild, GuildApplicationCommandManager, OAuth2Guild, Snowflake } from "discord.js";
import RadioClient from "../Client"; import RadioClient from "../Client";
import bug from "./commands/bug";
import help from "./commands/help"; import help from "./commands/help";
import invite from "./commands/invite";
import list from "./commands/list"; import list from "./commands/list";
import maintenance from "./commands/maintenance"; import maintenance from "./commands/maintenance";
import next from "./commands/next"; import next from "./commands/next";
@ -21,35 +19,17 @@ export interface command {
} }
export default async function commands(client: RadioClient) { export default async function commands(client: RadioClient) {
const commands : command[] = [ bug, help, invite, list, maintenance, next, play, prev, statistics, status, stop ]; const commands1 : command[] = [ help, list, maintenance, next, play, prev, statistics, status, stop ];
const commands2 = await client.application?.commands.fetch();
for(const command of commands){ for(const command of commands1){
client.commands.set(command.name, command); client.commands.set(command.name, command);
} }
if(!client.application) return;
client.funcs.logger('Application Commands', 'Started refreshing application (/) commands.'); client.funcs.logger('Application Commands', 'Started refreshing application (/) commands.');
if(client.config.devMode){ if(commands1){
client.application.commands.set([]); for(const command of commands1){
for(const command of commands){ await client.application?.commands.create({
let guilds = await client.guilds.fetch();
guilds.forEach(async (guild: { id: Snowflake; name: string; }) => {
try {
if(!client.application) return;
await client.application.commands.create({
name: command.name,
description: command.description,
options: command.options || []
}, guild.id);
client.funcs.logger('Application Commands', 'Guild: ' + guild.id + " (" + guild.name + ") \n" + 'Command: ' + command.name);
} catch(DiscordAPIError) {
client.funcs.logger('Application Commands', 'Guild: ' + guild.id + " (" + guild.name + ") [FAILED] \n" + 'Command: ' + command.name);
}
});
}
} else {
for(const command of commands){
await client.application.commands.create({
name: command.name, name: command.name,
description: command.description, description: command.description,
options: command.options || [] options: command.options || []
@ -57,15 +37,24 @@ export default async function commands(client: RadioClient) {
client.funcs.logger('Application Commands', 'Command: ' + command.name); client.funcs.logger('Application Commands', 'Command: ' + command.name);
} }
}
if(commands2){
commands2.forEach(async command2 => {
if(commands1.findIndex((command1) => command1.name == command2.name) == -1){
await client.application?.commands.delete(command2.id);
}
});
}
let guilds = await client.guilds.fetch(); let guilds = await client.guilds.fetch();
guilds.forEach(async (guild: { id: Snowflake; }) => { guilds.forEach(async (guild: Guild | OAuth2Guild) => {
try { try {
if(!client.application) return; if(!client.application) return;
await client.application.commands.set([], guild.id); await client.application.commands.set([], guild.id);
} catch (DiscordAPIError){ } catch (DiscordAPIError){
} }
}); });
}
client.funcs.logger('Application Commands', 'Successfully reloaded application (/) commands.' + "\n"); client.funcs.logger('Application Commands', 'Successfully reloaded application (/) commands.' + "\n");
} }

View File

@ -1,34 +0,0 @@
import { ChatInputCommandInteraction, EmbedBuilder } from "discord.js";
import RadioClient from "../../Client";
export default {
name: 'bug',
description: 'Report a bug',
category: 'info',
async execute(interaction: ChatInputCommandInteraction, client: RadioClient) {
if(!client.user) return interaction.reply({
content: client.messages.emojis["error"] + client.messages.maintenance,
ephemeral: true
});
const embed = new EmbedBuilder()
.setTitle(client.messages.replace(client.messages.bugTitle, {
"%client.user.username%": client.user.username
}))
.setThumbnail("https://cdn.discordapp.com/emojis/" + client.messages.emojis["logo"].replace(/[^0-9]+/g, ''))
.setColor(client.config.embedColor)
.setDescription(client.messages.replace(client.messages.bugDescription, {
"%client.config.supportGuild%": client.config.supportGuild
}))
.setImage('https://waren.io/berriabot-temp-sa7a36a9xm6837br/images/empty-3.png')
.setFooter({
text: client.messages.footerText,
iconURL: "https://cdn.discordapp.com/emojis/" + client.messages.emojis["eximiabots"].replace(/[^0-9]+/g, '')
});
interaction.reply({
embeds: [embed],
ephemeral: true
});
}
};

View File

@ -13,23 +13,12 @@ export default {
ephemeral: true ephemeral: true
}); });
const categories: string[] = [];
for (let i = 0; i < client.commands.size; i++) {
if (!categories.includes([...client.commands.values()][i].category)) categories.push([...client.commands.values()][i].category);
}
let commands = '';
for (let i = 0; i < categories.length; i++) {
commands += `**» ${categories[i].toUpperCase()}**\n${client.commands.filter(x => x.category === categories[i]).map((x: command) => `\`${x.name}\``).join(', ')}\n`;
}
const embed = new EmbedBuilder() const embed = new EmbedBuilder()
.setTitle(client.messages.replace(client.messages.helpTitle, { .setTitle(client.messages.helpTitle)
"%client.user.username%": client.user.username
}))
.setThumbnail("https://cdn.discordapp.com/emojis/" + client.messages.emojis["logo"].replace(/[^0-9]+/g, '')) .setThumbnail("https://cdn.discordapp.com/emojis/" + client.messages.emojis["logo"].replace(/[^0-9]+/g, ''))
.setColor(client.config.embedColor) .setColor(client.config.embedColor)
.setDescription(client.messages.replace(client.messages.helpDescription, { .setDescription(client.messages.replace(client.messages.helpDescription, {
"%commands%": commands "%client.config.supportGuild%": client.config.supportGuild
})) }))
.setImage('https://waren.io/berriabot-temp-sa7a36a9xm6837br/images/empty-3.png') .setImage('https://waren.io/berriabot-temp-sa7a36a9xm6837br/images/empty-3.png')
.setFooter({ .setFooter({

View File

@ -1,32 +0,0 @@
import { ChatInputCommandInteraction, EmbedBuilder } from "discord.js";
import RadioClient from "../../Client";
export default {
name: 'invite',
description: 'Invite Bot',
category: 'info',
execute(interaction: ChatInputCommandInteraction, client: RadioClient) {
if(!client.user) return interaction.reply({
content: client.messages.emojis["error"] + client.messages.maintenance,
ephemeral: true
});
const embed = new EmbedBuilder()
.setTitle(client.messages.replace(client.messages.inviteTitle, {
"%client.user.username%": client.user.username
}))
.setColor(client.config.embedColor)
.setURL("https://discord.com/api/oauth2/authorize?client_id=" + client.user.id + "&permissions=2184465408&scope=applications.commands%20bot") //View Channels, Send Messages, Embed Links, Use External Emojis, Use Slash Commands, Connect, Speak, Use Voice Activity
.setImage('https://waren.io/berriabot-temp-sa7a36a9xm6837br/images/empty-3.png')
.setFooter({
text: client.messages.footerText,
iconURL: "https://cdn.discordapp.com/emojis/" + client.messages.emojis["eximiabots"].replace(/[^0-9]+/g, '')
});
interaction.reply({
embeds: [embed],
ephemeral: true
});
}
};

View File

@ -5,6 +5,6 @@ export default function uncaughtException(client: RadioClient, error: Error) {
console.log(error.stack); console.log(error.stack);
console.log(''); console.log('');
if(error.name == "DiscordAPIError" && error.message == "Unknown interaction") return; if(error.name == "DiscordAPIError[10062]" && error.message == "Unknown interaction") return;
process.emit('SIGINT'); process.emit('SIGINT');
} }

View File

@ -205,7 +205,7 @@ export default async function play(client: RadioClient, interaction: ChatInputCo
radio.message = await radio.textChannel?.send({ embeds: [embed], components: [buttons] }) ?? null; radio.message = await radio.textChannel?.send({ embeds: [embed], components: [buttons] }) ?? null;
} }
} }
},2500); },10000);
interaction?.reply({ interaction?.reply({
content: client.messages.emojis["play"] + client.messages.replace(client.messages.play, { content: client.messages.emojis["play"] + client.messages.replace(client.messages.play, {

View File

@ -16,11 +16,8 @@ export const messages = {
notPlaying: "There is nothing playing!", notPlaying: "There is nothing playing!",
runningCommandFailed: "Running this command failed!", runningCommandFailed: "Running this command failed!",
noPermsEmbed: "I cannot send embeds (Embed links).", noPermsEmbed: "I cannot send embeds (Embed links).",
bugTitle: "Found a bug with %client.user.username%?", helpTitle: "Help",
bugDescription: "Join the support server" + "\n" + "%client.config.supportGuild%", helpDescription: "Join to our support server" + "\n" + "%client.config.supportGuild%",
helpTitle: "%client.user.username% help:",
helpDescription: "%commands%",
inviteTitle: "Invite %client.user.username% to your Discord server!",
listTitle: "Radio Stations", listTitle: "Radio Stations",
playTitle1: ":radio: Channel", playTitle1: ":radio: Channel",
playDescription1: "__%radio.station.name%__" + "\n" + "%radio.station.owner%", playDescription1: "__%radio.station.name%__" + "\n" + "%radio.station.owner%",

View File

@ -6,7 +6,7 @@ export default {
token: process.env.DISCORD_TOKEN, token: process.env.DISCORD_TOKEN,
//radio stations //radio stations
stationslistUrl: process.env.RADIOX_STATIONSLISTURL || "https://git.cwinfo.net/cwchristerw/radio/raw/branch/master/playlist.json", stationslistUrl: process.env.RADIOX_STATIONSLISTURL || "https://eximiabots.waren.io/radiox/stations.json",
//support //support
supportGuild: "https://discord.gg/rRA65Mn", supportGuild: "https://discord.gg/rRA65Mn",