mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2025-07-01 15:03:37 +00:00
Compare commits
75 Commits
Author | SHA1 | Date | |
---|---|---|---|
75f5d57ad0 | |||
78b176addc | |||
3e6975316e | |||
3e609fc255 | |||
0ff7fbef8d | |||
fa8c0b31df | |||
513369d47b | |||
d5f9495360 | |||
a64ab88433 | |||
175fe20f9d | |||
f26962f52f | |||
7db544527c | |||
c94fb11197 | |||
a4595ef6c6 | |||
22c45cb590 | |||
bda70e7cf7 | |||
080e070f19 | |||
0f33298859 | |||
c2e4f8c3e1 | |||
9ebb38abc8 | |||
7ec4238257 | |||
e675885a3c | |||
6ca0199be8 | |||
eeb1cab16f | |||
29b6be2c54 | |||
578cd30034 | |||
e4f72f57bc | |||
9e34477235 | |||
3e7ff2de86 | |||
835b6bcd2c | |||
2ce02b8545 | |||
f8dc1e14af | |||
fd5c1b1af5 | |||
c9cc638c3b | |||
4d0fe97db4 | |||
a93c0935b6 | |||
e79008cbf5 | |||
b00f8664e0 | |||
2ecf48ef36 | |||
2403ab46aa | |||
bf924bc97b | |||
d1632f4f49 | |||
c0d0cf23dc | |||
c899266975 | |||
fe62792949 | |||
e084ee711c | |||
b527f16c4f | |||
0a3eca23a4 | |||
6da3505ff8 | |||
89415efb46 | |||
f17baa0a99 | |||
34053dc2e8 | |||
c2b9000079 | |||
cc0864f3d9 | |||
db712e849d | |||
288de9b005 | |||
c38f68f8d7 | |||
7f5a69708c | |||
37c099e189 | |||
370f837b02 | |||
d64fd57285 | |||
32fabe63ff | |||
2a7dca38f2 | |||
c21082c67b | |||
d904d65eed | |||
8b36ff0459 | |||
c7d887e053 | |||
4580264c04 | |||
7eb91412f7 | |||
52581d8e26 | |||
d9a970f8da | |||
a131dd5488 | |||
8c74d1fcfb | |||
78d960ccf1 | |||
133e575bf3 |
@ -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
16
.github/labeler.yml
vendored
@ -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
|
||||||
|
6
.github/workflows/codeql-analyze.yml
vendored
6
.github/workflows/codeql-analyze.yml
vendored
@ -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
|
||||||
|
2
.github/workflows/labeler.yml
vendored
2
.github/workflows/labeler.yml
vendored
@ -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
|
||||||
|
@ -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
|
||||||
|
281
package-lock.json
generated
281
package-lock.json
generated
@ -1,37 +1,37 @@
|
|||||||
{
|
{
|
||||||
"name": "eximiabots-radiox",
|
"name": "eximiabots-radiox",
|
||||||
"version": "0.5.2",
|
"version": "0.5.4",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "eximiabots-radiox",
|
"name": "eximiabots-radiox",
|
||||||
"version": "0.5.2",
|
"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.63",
|
"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.9.4",
|
"@types/node": "^20.10.5",
|
||||||
"@types/ws": "^8.5.9",
|
"@types/ws": "^8.5.9",
|
||||||
"@typescript-eslint/eslint-plugin": "^6.10.0",
|
"@typescript-eslint/eslint-plugin": "^6.15.0",
|
||||||
"@typescript-eslint/parser": "^6.11.0",
|
"@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.9.4",
|
"version": "20.10.5",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.9.4.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.5.tgz",
|
||||||
"integrity": "sha512-wmyg8HUhcn6ACjsn8oKYjkN/zUzQeNtMy44weTJSM6p4MMzEOuKbA3OjJ267uPCOW7Xex9dyrNTful8XTQYoDA==",
|
"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.12.0",
|
"version": "6.15.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.12.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.15.0.tgz",
|
||||||
"integrity": "sha512-XOpZ3IyJUIV1b15M7HVOpgQxPPF7lGXgsfcEIu3yDxFPaf/xZKt7s9QO/pbk7vpWQyVulpJbu4E5LwpZiQo4kA==",
|
"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.12.0",
|
"@typescript-eslint/scope-manager": "6.15.0",
|
||||||
"@typescript-eslint/type-utils": "6.12.0",
|
"@typescript-eslint/type-utils": "6.15.0",
|
||||||
"@typescript-eslint/utils": "6.12.0",
|
"@typescript-eslint/utils": "6.15.0",
|
||||||
"@typescript-eslint/visitor-keys": "6.12.0",
|
"@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.12.0",
|
"version": "6.15.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.12.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.15.0.tgz",
|
||||||
"integrity": "sha512-s8/jNFPKPNRmXEnNXfuo1gemBdVmpQsK1pcu+QIvuNJuhFzGrpD7WjOcvDc/+uEdfzSYpNu7U/+MmbScjoQ6vg==",
|
"integrity": "sha512-MkgKNnsjC6QwcMdlNAel24jjkEO/0hQaMDLqP4S9zq5HBAUJNQB6y+3DwLjX7b3l2b37eNAxMPLwb3/kh8VKdA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/scope-manager": "6.12.0",
|
"@typescript-eslint/scope-manager": "6.15.0",
|
||||||
"@typescript-eslint/types": "6.12.0",
|
"@typescript-eslint/types": "6.15.0",
|
||||||
"@typescript-eslint/typescript-estree": "6.12.0",
|
"@typescript-eslint/typescript-estree": "6.15.0",
|
||||||
"@typescript-eslint/visitor-keys": "6.12.0",
|
"@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.12.0",
|
"version": "6.15.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.12.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.15.0.tgz",
|
||||||
"integrity": "sha512-5gUvjg+XdSj8pcetdL9eXJzQNTl3RD7LgUiYTl8Aabdi8hFkaGSYnaS6BLc0BGNaDH+tVzVwmKtWvu0jLgWVbw==",
|
"integrity": "sha512-+BdvxYBltqrmgCNu4Li+fGDIkW9n//NrruzG9X1vBzaNK+ExVXPoGB71kneaVw/Jp+4rH/vaMAGC6JfMbHstVg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/types": "6.12.0",
|
"@typescript-eslint/types": "6.15.0",
|
||||||
"@typescript-eslint/visitor-keys": "6.12.0"
|
"@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.12.0",
|
"version": "6.15.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.12.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.15.0.tgz",
|
||||||
"integrity": "sha512-WWmRXxhm1X8Wlquj+MhsAG4dU/Blvf1xDgGaYCzfvStP2NwPQh6KBvCDbiOEvaE0filhranjIlK/2fSTVwtBng==",
|
"integrity": "sha512-CnmHKTfX6450Bo49hPg2OkIm/D/TVYV7jO1MCfPYGwf6x3GO0VU8YMO5AYMn+u3X05lRRxA4fWCz87GFQV6yVQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/typescript-estree": "6.12.0",
|
"@typescript-eslint/typescript-estree": "6.15.0",
|
||||||
"@typescript-eslint/utils": "6.12.0",
|
"@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.12.0",
|
"version": "6.15.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.12.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.15.0.tgz",
|
||||||
"integrity": "sha512-MA16p/+WxM5JG/F3RTpRIcuOghWO30//VEOvzubM8zuOOBYXsP+IfjoCXXiIfy2Ta8FRh9+IO9QLlaFQUU+10Q==",
|
"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.12.0",
|
"version": "6.15.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.12.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.15.0.tgz",
|
||||||
"integrity": "sha512-vw9E2P9+3UUWzhgjyyVczLWxZ3GuQNT7QpnIY3o5OMeLO/c8oHljGc8ZpryBMIyympiAAaKgw9e5Hl9dCWFOYw==",
|
"integrity": "sha512-7mVZJN7Hd15OmGuWrp2T9UvqR2Ecg+1j/Bp1jXUEY2GZKV6FXlOIoqVDmLpBiEiq3katvj/2n2mR0SDwtloCew==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/types": "6.12.0",
|
"@typescript-eslint/types": "6.15.0",
|
||||||
"@typescript-eslint/visitor-keys": "6.12.0",
|
"@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.12.0",
|
"version": "6.15.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.12.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.15.0.tgz",
|
||||||
"integrity": "sha512-LywPm8h3tGEbgfyjYnu3dauZ0U7R60m+miXgKcZS8c7QALO9uWJdvNoP+duKTk2XMWc7/Q3d/QiCuLN9X6SWyQ==",
|
"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.12.0",
|
"@typescript-eslint/scope-manager": "6.15.0",
|
||||||
"@typescript-eslint/types": "6.12.0",
|
"@typescript-eslint/types": "6.15.0",
|
||||||
"@typescript-eslint/typescript-estree": "6.12.0",
|
"@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.12.0",
|
"version": "6.15.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.12.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.15.0.tgz",
|
||||||
"integrity": "sha512-rg3BizTZHF1k3ipn8gfrzDXXSFKyOEB5zxYXInQ6z0hUvmQlhaZQzK+YmHmNViMA9HzW5Q9+bPPt90bU6GQwyw==",
|
"integrity": "sha512-1zvtdC1a9h5Tb5jU9x3ADNXO9yjP8rXlaoChu0DQX40vf5ACVpYIVIZhIMZ6d5sDXH7vq4dsZBT1fEGj8D2n2w==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/types": "6.12.0",
|
"@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"
|
||||||
@ -916,9 +915,9 @@
|
|||||||
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
|
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
|
||||||
},
|
},
|
||||||
"node_modules/big-integer": {
|
"node_modules/big-integer": {
|
||||||
"version": "1.6.51",
|
"version": "1.6.52",
|
||||||
"resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz",
|
"resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.52.tgz",
|
||||||
"integrity": "sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==",
|
"integrity": "sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=0.6"
|
"node": ">=0.6"
|
||||||
@ -1164,9 +1163,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/discord-api-types": {
|
"node_modules/discord-api-types": {
|
||||||
"version": "0.37.64",
|
"version": "0.37.66",
|
||||||
"resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.64.tgz",
|
"resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.66.tgz",
|
||||||
"integrity": "sha512-9aS+QuoNj+4e9d5uDKfds1DCpQLYn/mHx+M8OFHZ/ZZJVadZJEo275uBOaSsw5KGYGsZ4hxMzlOkIxnWirgqKA=="
|
"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"
|
||||||
@ -2155,18 +2184,18 @@
|
|||||||
"integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw=="
|
"integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw=="
|
||||||
},
|
},
|
||||||
"node_modules/lru-cache": {
|
"node_modules/lru-cache": {
|
||||||
"version": "10.0.3",
|
"version": "10.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.1.0.tgz",
|
||||||
"integrity": "sha512-B7gr+F6MkqB3uzINHXNctGieGsRTMwIBgxkp0yq/5BwcuDzD4A8wQpHQW6vDAm1uKSLQghmRdD9sKqf2vJ1cEg==",
|
"integrity": "sha512-/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "14 || >=16.14"
|
"node": "14 || >=16.14"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"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"
|
||||||
},
|
},
|
||||||
|
22
package.json
22
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "eximiabots-radiox",
|
"name": "eximiabots-radiox",
|
||||||
"version": "0.5.2",
|
"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.63",
|
"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.9.4",
|
"@types/node": "^20.10.5",
|
||||||
"@types/ws": "^8.5.9",
|
"@types/ws": "^8.5.9",
|
||||||
"@typescript-eslint/eslint-plugin": "^6.10.0",
|
"@typescript-eslint/eslint-plugin": "^6.15.0",
|
||||||
"@typescript-eslint/parser": "^6.11.0",
|
"@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",
|
||||||
|
@ -1,19 +1,20 @@
|
|||||||
import { Channel, Collection, GuildMember, OAuth2Guild, TextBasedChannel, VoiceBasedChannel, VoiceChannel } from "discord.js";
|
import { Collection, GuildMember, Message, OAuth2Guild, TextBasedChannel, VoiceBasedChannel, VoiceChannel } from "discord.js";
|
||||||
import { getVoiceConnection, joinVoiceChannel, VoiceConnection } from "@discordjs/voice";
|
import { getVoiceConnection, joinVoiceChannel, VoiceConnection } from "@discordjs/voice";
|
||||||
import RadioClient from "../../Client";
|
import RadioClient from "../../Client";
|
||||||
import { station } from "./Stations";
|
import { station } from "./Stations";
|
||||||
import { datastore } from "./Datastore";
|
import { datastore } from "./Datastore";
|
||||||
|
|
||||||
export interface radio {
|
export interface radio {
|
||||||
textChannel: Channel | TextBasedChannel | undefined | null,
|
textChannel: TextBasedChannel | undefined | null,
|
||||||
voiceChannel: Channel | VoiceBasedChannel | undefined,
|
voiceChannel: VoiceBasedChannel | undefined,
|
||||||
connection: VoiceConnection | null,
|
connection: VoiceConnection | null,
|
||||||
message: null,
|
message: Message | null,
|
||||||
station: station,
|
station: station,
|
||||||
datastore?: datastore,
|
datastore?: datastore,
|
||||||
currentTime?: number,
|
currentTime?: number,
|
||||||
startTime: number,
|
startTime: number,
|
||||||
playTime?: number,
|
playTime?: number,
|
||||||
|
guild?: any
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface state {
|
export interface state {
|
||||||
@ -28,7 +29,7 @@ export interface state {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default class Radio extends Map {
|
export default class Radio extends Map<string, radio> {
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
@ -75,8 +76,8 @@ export default class Radio extends Map {
|
|||||||
|
|
||||||
let date = new Date();
|
let date = new Date();
|
||||||
const construct: radio = {
|
const construct: radio = {
|
||||||
textChannel: client.channels.cache.get(state.channels.text),
|
textChannel: client.channels.cache.get(state.channels.text) as TextBasedChannel,
|
||||||
voiceChannel: client.channels.cache.get(state.channels.voice),
|
voiceChannel: client.channels.cache.get(state.channels.voice) as VoiceBasedChannel,
|
||||||
connection: null,
|
connection: null,
|
||||||
message: null,
|
message: null,
|
||||||
station: station,
|
station: station,
|
||||||
|
@ -8,9 +8,10 @@ export interface station {
|
|||||||
[key: string]: string
|
[key: string]: string
|
||||||
},
|
},
|
||||||
playlist?: {
|
playlist?: {
|
||||||
type: "supla" | "yle",
|
type: "radioplay" | "supla" | "yle",
|
||||||
address: string | string
|
address: string | string
|
||||||
}
|
}
|
||||||
|
track?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default class Stations extends Array {
|
export default class Stations extends Array {
|
||||||
|
@ -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),
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,9 @@
|
|||||||
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";
|
||||||
import nowplaying from "./commands/nowplaying";
|
|
||||||
import play from "./commands/play";
|
import play from "./commands/play";
|
||||||
import prev from "./commands/prev";
|
import prev from "./commands/prev";
|
||||||
import statistics from "./commands/statistics";
|
import statistics from "./commands/statistics";
|
||||||
@ -22,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, nowplaying, 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 || []
|
||||||
@ -58,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);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let guilds = await client.guilds.fetch();
|
if(commands2){
|
||||||
guilds.forEach(async (guild: { id: Snowflake; }) => {
|
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();
|
||||||
|
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");
|
||||||
}
|
}
|
||||||
|
@ -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
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
@ -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({
|
||||||
|
@ -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
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
@ -1,10 +1,13 @@
|
|||||||
import { ButtonInteraction, ChatInputCommandInteraction, EmbedBuilder, StringSelectMenuInteraction } from "discord.js";
|
import { ApplicationCommandOptionType, ButtonInteraction, ChatInputCommandInteraction, EmbedBuilder, StringSelectMenuInteraction } from "discord.js";
|
||||||
import RadioClient from "../../Client";
|
import RadioClient from "../../Client";
|
||||||
import { station } from "../classes/Stations";
|
import { station } from "../classes/Stations";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'list',
|
name: 'list',
|
||||||
description: 'List radio stations',
|
description: 'List stations',
|
||||||
|
options: [
|
||||||
|
{ type: ApplicationCommandOptionType.String, name: "query", description: "Select list", choices: [{"name": "1", "value": "1"},{"name": "2", "value": "2"}], required: false}
|
||||||
|
],
|
||||||
category: 'radio',
|
category: 'radio',
|
||||||
execute(interaction: ButtonInteraction | ChatInputCommandInteraction | StringSelectMenuInteraction, client: RadioClient) {
|
execute(interaction: ButtonInteraction | ChatInputCommandInteraction | StringSelectMenuInteraction, client: RadioClient) {
|
||||||
|
|
||||||
@ -15,6 +18,20 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!interaction.guild) return;
|
||||||
|
|
||||||
|
let query: string | null = null;
|
||||||
|
|
||||||
|
if(interaction.isChatInputCommand()){
|
||||||
|
query = interaction.options?.getString("query");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(interaction.isStringSelectMenu()){
|
||||||
|
query = interaction.values?.[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!query) query = "1";
|
||||||
|
|
||||||
if(!client.stations) {
|
if(!client.stations) {
|
||||||
return interaction.reply({
|
return interaction.reply({
|
||||||
content: client.messages.emojis["error"] + client.messages.replace(client.messages.errorToGetPlaylist, {
|
content: client.messages.emojis["error"] + client.messages.replace(client.messages.errorToGetPlaylist, {
|
||||||
@ -24,10 +41,10 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const radio = client.radio?.get(interaction.guild?.id);
|
const radio = client.radio?.get(interaction.guild.id);
|
||||||
|
|
||||||
if(radio && !client.config.maintenanceMode){
|
if(radio && !client.config.maintenanceMode){
|
||||||
client.funcs.listStations(client, interaction);
|
client.funcs.listStations(client, interaction, query);
|
||||||
} else {
|
} else {
|
||||||
let stations = `${client.stations.map((s: station) => `**#** ${s.name}`).join('\n')}`
|
let stations = `${client.stations.map((s: station) => `**#** ${s.name}`).join('\n')}`
|
||||||
const hashs = stations.split('**#**').length;
|
const hashs = stations.split('**#**').length;
|
||||||
|
@ -183,7 +183,7 @@ export default {
|
|||||||
client.user?.setStatus('idle');
|
client.user?.setStatus('idle');
|
||||||
client.radio?.save(client);
|
client.radio?.save(client);
|
||||||
|
|
||||||
setInterval(() => {
|
let timer : NodeJS.Timeout = setInterval(() => {
|
||||||
if(client.radio?.size == 0 && client.config.streamerMode == "manual" && client.config.maintenanceMode){
|
if(client.radio?.size == 0 && client.config.streamerMode == "manual" && client.config.maintenanceMode){
|
||||||
client.streamer?.leave(client);
|
client.streamer?.leave(client);
|
||||||
client.streamer = new Streamer();
|
client.streamer = new Streamer();
|
||||||
@ -195,9 +195,9 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!client.config.maintenanceMode){
|
if(!client.config.maintenanceMode){
|
||||||
clearInterval(undefined);
|
clearInterval(timer);
|
||||||
}
|
}
|
||||||
}, 500);
|
}, 1000);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case "11":
|
case "11":
|
||||||
@ -207,7 +207,7 @@ export default {
|
|||||||
client.user?.setStatus('idle');
|
client.user?.setStatus('idle');
|
||||||
client.radio?.save(client);
|
client.radio?.save(client);
|
||||||
|
|
||||||
setInterval(() => {
|
let timer2 : NodeJS.Timeout = setInterval(() => {
|
||||||
if(client.radio?.size == 0 && client.config.streamerMode == "auto" && client.config.maintenanceMode){
|
if(client.radio?.size == 0 && client.config.streamerMode == "auto" && client.config.maintenanceMode){
|
||||||
client.streamer?.leave(client);
|
client.streamer?.leave(client);
|
||||||
client.streamer = new Streamer();
|
client.streamer = new Streamer();
|
||||||
@ -219,9 +219,9 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!client.config.maintenanceMode){
|
if(!client.config.maintenanceMode){
|
||||||
clearInterval(undefined);
|
clearInterval(timer2);
|
||||||
}
|
}
|
||||||
}, 500);
|
}, 1000);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -9,7 +9,9 @@ export default {
|
|||||||
category: 'radio',
|
category: 'radio',
|
||||||
async execute(interaction: ButtonInteraction | ChatInputCommandInteraction | StringSelectMenuInteraction, client: RadioClient, command: command) {
|
async execute(interaction: ButtonInteraction | ChatInputCommandInteraction | StringSelectMenuInteraction, client: RadioClient, command: command) {
|
||||||
if (client.funcs.check(client, interaction, command)) {
|
if (client.funcs.check(client, interaction, command)) {
|
||||||
|
if(!interaction.guild) return;
|
||||||
const radio = client.radio?.get(interaction.guild?.id);
|
const radio = client.radio?.get(interaction.guild?.id);
|
||||||
|
if(!radio) return;
|
||||||
|
|
||||||
if(client.config.maintenanceMode){
|
if(client.config.maintenanceMode){
|
||||||
return interaction.reply({
|
return interaction.reply({
|
||||||
|
@ -1,62 +0,0 @@
|
|||||||
import { ButtonInteraction, ChatInputCommandInteraction, EmbedBuilder, StringSelectMenuInteraction } from "discord.js";
|
|
||||||
import RadioClient from "../../Client";
|
|
||||||
import { command } from "../commands";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'nowplaying',
|
|
||||||
description: 'Current Radio Station',
|
|
||||||
category: 'radio',
|
|
||||||
async execute(interaction: ButtonInteraction | ChatInputCommandInteraction | StringSelectMenuInteraction, client: RadioClient, command: command) {
|
|
||||||
if(client.funcs.check(client, interaction, command)) {
|
|
||||||
|
|
||||||
const radio = client.radio?.get(interaction.guild?.id);
|
|
||||||
|
|
||||||
let date = new Date();
|
|
||||||
radio.currentTime = date.getTime();
|
|
||||||
radio.playTime = parseInt(radio.currentTime)-parseInt(radio.startTime);
|
|
||||||
const completed = (radio.playTime);
|
|
||||||
|
|
||||||
if(radio.station?.playlist?.type == "supla" || radio.station?.playlist?.type == "yle"){
|
|
||||||
let playlist: any = await fetch(radio.station.playlist.address)
|
|
||||||
.then((response: Response) => response.json())
|
|
||||||
.catch(error => {
|
|
||||||
});
|
|
||||||
try {
|
|
||||||
switch(radio.station?.playlist.type){
|
|
||||||
case "supla":
|
|
||||||
radio.station.track = "__" + playlist.items[0]?.artist + "__" + "\n" + playlist.items[0]?.song;
|
|
||||||
break;
|
|
||||||
case "yle":
|
|
||||||
radio.station.track = "-";
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
radio.station.track = "-";
|
|
||||||
}
|
|
||||||
} catch(TypeError) {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const embed = new EmbedBuilder()
|
|
||||||
.setTitle(client.messages.nowplayingTitle)
|
|
||||||
.setThumbnail((radio.station.logo || "https://cdn.discordapp.com/emojis/" + client.messages.emojis["play"].replace(/[^0-9]+/g, '')))
|
|
||||||
.setColor(client.config.embedColor)
|
|
||||||
.setDescription(client.messages.replace(client.messages.nowplayingDescription, {
|
|
||||||
"%radio.station.name%": radio.station.name,
|
|
||||||
"%radio.station.owner%\n": radio.station.name != radio.station.owner ? radio.station.owner + "\n" : "",
|
|
||||||
"%client.funcs.msToTime(completed)%": client.funcs.msToTime(completed),
|
|
||||||
"\n\n%radio.station.track%": radio.station.track != undefined ? "\n\n" + radio.station.track : ""
|
|
||||||
}))
|
|
||||||
.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
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
@ -13,6 +13,8 @@ export default {
|
|||||||
category: "radio",
|
category: "radio",
|
||||||
async execute(interaction: ChatInputCommandInteraction | StringSelectMenuInteraction, client: RadioClient) {
|
async execute(interaction: ChatInputCommandInteraction | StringSelectMenuInteraction, client: RadioClient) {
|
||||||
|
|
||||||
|
if(!interaction.guild) return;
|
||||||
|
|
||||||
if(client.config.maintenanceMode){
|
if(client.config.maintenanceMode){
|
||||||
return interaction.reply({
|
return interaction.reply({
|
||||||
content: client.messages.emojis["error"] + client.messages.maintenance,
|
content: client.messages.emojis["error"] + client.messages.maintenance,
|
||||||
@ -40,10 +42,10 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!query){
|
if(!query){
|
||||||
return client.funcs.listStations(client, interaction);
|
return client.funcs.listStations(client, interaction, "1");
|
||||||
}
|
}
|
||||||
|
|
||||||
const radio = client.radio?.get(interaction.guild?.id);
|
const radio = client.radio?.get(interaction.guild.id);
|
||||||
|
|
||||||
if(!(interaction.member instanceof GuildMember)) return;
|
if(!(interaction.member instanceof GuildMember)) return;
|
||||||
const voiceChannel = interaction.member?.voice.channel;
|
const voiceChannel = interaction.member?.voice.channel;
|
||||||
|
@ -9,7 +9,9 @@ export default {
|
|||||||
category: 'radio',
|
category: 'radio',
|
||||||
async execute(interaction: ButtonInteraction | ChatInputCommandInteraction | StringSelectMenuInteraction, client: RadioClient, command: command) {
|
async execute(interaction: ButtonInteraction | ChatInputCommandInteraction | StringSelectMenuInteraction, client: RadioClient, command: command) {
|
||||||
if (client.funcs.check(client, interaction, command)) {
|
if (client.funcs.check(client, interaction, command)) {
|
||||||
|
if(!interaction.guild) return;
|
||||||
const radio = client.radio?.get(interaction.guild?.id);
|
const radio = client.radio?.get(interaction.guild?.id);
|
||||||
|
if(!radio) return;
|
||||||
|
|
||||||
if(client.config.maintenanceMode){
|
if(client.config.maintenanceMode){
|
||||||
return interaction.reply({
|
return interaction.reply({
|
||||||
|
@ -8,7 +8,9 @@ export default {
|
|||||||
category: 'radio',
|
category: 'radio',
|
||||||
async execute(interaction: ButtonInteraction | ChatInputCommandInteraction | StringSelectMenuInteraction, client: RadioClient, command: command) {
|
async execute(interaction: ButtonInteraction | ChatInputCommandInteraction | StringSelectMenuInteraction, client: RadioClient, command: command) {
|
||||||
if (client.funcs.check(client, interaction, command)) {
|
if (client.funcs.check(client, interaction, command)) {
|
||||||
|
if(!interaction.guild) return;
|
||||||
const radio = client.radio?.get(interaction.guild?.id);
|
const radio = client.radio?.get(interaction.guild?.id);
|
||||||
|
if(!radio) return;
|
||||||
client.statistics?.update(client, interaction.guild, radio);
|
client.statistics?.update(client, interaction.guild, radio);
|
||||||
radio.connection?.destroy();
|
radio.connection?.destroy();
|
||||||
client.funcs.logger('Radio', interaction.guild?.id + " / " + 'Stop');
|
client.funcs.logger('Radio', interaction.guild?.id + " / " + 'Stop');
|
||||||
@ -18,7 +20,7 @@ export default {
|
|||||||
.setThumbnail("https://cdn.discordapp.com/emojis/" + client.messages.emojis["stop"].replace(/[^0-9]+/g, ''))
|
.setThumbnail("https://cdn.discordapp.com/emojis/" + client.messages.emojis["stop"].replace(/[^0-9]+/g, ''))
|
||||||
.setColor(client.config.embedColor)
|
.setColor(client.config.embedColor)
|
||||||
.addFields({
|
.addFields({
|
||||||
name: client.messages.nowplayingTitle,
|
name: client.messages.playTitle1,
|
||||||
value: "-"
|
value: "-"
|
||||||
})
|
})
|
||||||
.setImage('https://waren.io/berriabot-temp-sa7a36a9xm6837br/images/empty-3.png')
|
.setImage('https://waren.io/berriabot-temp-sa7a36a9xm6837br/images/empty-3.png')
|
||||||
@ -28,9 +30,9 @@ export default {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if(!radio.message){
|
if(!radio.message){
|
||||||
radio.message = radio.textChannel.send({ embeds: [embed], components: [] });
|
radio.message = await radio.textChannel?.send({ embeds: [embed], components: [] }) ?? null;
|
||||||
} else {
|
} else {
|
||||||
if(radio.textChannel.id == radio.message.channel.id){
|
if(radio.textChannel?.id == radio.message.channel.id){
|
||||||
radio.message.edit({ embeds: [embed], components: [] });
|
radio.message.edit({ embeds: [embed], components: [] });
|
||||||
} else {
|
} else {
|
||||||
radio.message?.delete();
|
radio.message?.delete();
|
||||||
@ -41,7 +43,7 @@ export default {
|
|||||||
await radio.message?.delete();
|
await radio.message?.delete();
|
||||||
}, 5000);
|
}, 5000);
|
||||||
|
|
||||||
client.radio?.delete(interaction.guild?.id);
|
client.radio?.delete(interaction.guild.id);
|
||||||
|
|
||||||
interaction.reply({
|
interaction.reply({
|
||||||
content: client.messages.emojis["stop"] + client.messages.stop,
|
content: client.messages.emojis["stop"] + client.messages.stop,
|
||||||
|
@ -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');
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@ export default async function voiceStateUpdate(client: RadioClient, oldState: Vo
|
|||||||
if ((oldState.channel.members.filter(member => !member.user.bot).size === 0 && oldState.channel === radio.voiceChannel) || change) {
|
if ((oldState.channel.members.filter(member => !member.user.bot).size === 0 && oldState.channel === radio.voiceChannel) || change) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (!radio || !radio.connection || !radio.connection === null) return;
|
if (!radio || !radio.connection || !radio.connection === null) return;
|
||||||
if (radio.voiceChannel.members.filter((member: GuildMember) => !member.user.bot).size === 0) {
|
if (radio.voiceChannel?.members.filter((member: GuildMember) => !member.user.bot).size === 0) {
|
||||||
client.statistics?.update(client, newState.guild, radio);
|
client.statistics?.update(client, newState.guild, radio);
|
||||||
radio.connection?.destroy();
|
radio.connection?.destroy();
|
||||||
radio.message?.delete();
|
radio.message?.delete();
|
||||||
|
@ -4,6 +4,7 @@ import { command } from "../commands";
|
|||||||
|
|
||||||
export default function check(client: RadioClient, interaction: ButtonInteraction | ChatInputCommandInteraction | StringSelectMenuInteraction, command: command) {
|
export default function check(client: RadioClient, interaction: ButtonInteraction | ChatInputCommandInteraction | StringSelectMenuInteraction, command: command) {
|
||||||
|
|
||||||
|
if(!interaction.guild) return;
|
||||||
const radio = client.radio?.get(interaction.guild?.id);
|
const radio = client.radio?.get(interaction.guild?.id);
|
||||||
if(!client.stations) {
|
if(!client.stations) {
|
||||||
interaction.reply({
|
interaction.reply({
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
import { ActionRowBuilder, ButtonInteraction, ChatInputCommandInteraction, SelectMenuComponentOptionData, StringSelectMenuBuilder, StringSelectMenuInteraction } from "discord.js";
|
import { ActionRowBuilder, ButtonInteraction, ChatInputCommandInteraction, SelectMenuComponentOptionData, StringSelectMenuBuilder, StringSelectMenuInteraction } from "discord.js";
|
||||||
import RadioClient from "../../Client";
|
import RadioClient from "../../Client";
|
||||||
|
|
||||||
export default function listStations(client: RadioClient, interaction: ButtonInteraction | ChatInputCommandInteraction | StringSelectMenuInteraction){
|
export default function listStations(client: RadioClient, interaction: ButtonInteraction | ChatInputCommandInteraction | StringSelectMenuInteraction, offset: string){
|
||||||
if(!client.stations) return;
|
if(!client.stations) return;
|
||||||
|
|
||||||
let options : SelectMenuComponentOptionData[] = new Array();
|
let options : SelectMenuComponentOptionData[] = new Array();
|
||||||
|
|
||||||
|
|
||||||
for (const station of client.stations){
|
for (const station of client.stations){
|
||||||
options.push({
|
options.push({
|
||||||
label: station.name,
|
label: station.name,
|
||||||
@ -14,6 +15,17 @@ export default function listStations(client: RadioClient, interaction: ButtonInt
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch(offset){
|
||||||
|
case "1":
|
||||||
|
options = options.slice(0,Math.round(options.length/2));
|
||||||
|
break;
|
||||||
|
case "2":
|
||||||
|
options = options.slice(Math.round(options.length/2),options.length-1);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
options = options.slice(0,Math.round(options.length/2));
|
||||||
|
}
|
||||||
|
|
||||||
const menu = new ActionRowBuilder<StringSelectMenuBuilder>()
|
const menu = new ActionRowBuilder<StringSelectMenuBuilder>()
|
||||||
.addComponents(
|
.addComponents(
|
||||||
new StringSelectMenuBuilder()
|
new StringSelectMenuBuilder()
|
||||||
|
@ -6,29 +6,42 @@ export default async function play(client: RadioClient, interaction: ChatInputCo
|
|||||||
if(!guild) return;
|
if(!guild) return;
|
||||||
|
|
||||||
const radio = client.radio?.get(guild.id);
|
const radio = client.radio?.get(guild.id);
|
||||||
|
if(!radio) return;
|
||||||
const audioPlayer = client.streamer?.listen(station);
|
const audioPlayer = client.streamer?.listen(station);
|
||||||
radio.connection.subscribe(audioPlayer);
|
if(!audioPlayer) return;
|
||||||
|
radio.connection?.subscribe(audioPlayer);
|
||||||
client.funcs.logger('Radio', guild.id + " / " + "Play" + " / " + radio.station.name);
|
client.funcs.logger('Radio', guild.id + " / " + "Play" + " / " + radio.station.name);
|
||||||
|
|
||||||
if(radio.station?.playlist?.type == "supla" || radio.station?.playlist?.type == "yle"){
|
if(radio.station.playlist){
|
||||||
let playlist: any = await fetch(radio.station.playlist.address)
|
if(radio.station.playlist.type == "radioplay" || radio.station.playlist.type == "supla" || radio.station.playlist.type == "yle"){
|
||||||
|
let playlist: any = await fetch(radio.station.playlist.address)
|
||||||
.then((response: Response) => response.json())
|
.then((response: Response) => response.json())
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
});
|
});
|
||||||
|
|
||||||
try {
|
radio.station.track = "-";
|
||||||
switch(radio.station?.playlist.type){
|
|
||||||
case "supla":
|
|
||||||
radio.station.track = "__" + playlist.items[0]?.artist + "__" + "\n" + playlist.items[0]?.song;
|
|
||||||
break;
|
|
||||||
case "yle":
|
|
||||||
radio.station.track = "-";
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
radio.station.track = "-";
|
|
||||||
}
|
|
||||||
} catch(TypeError) {
|
|
||||||
|
|
||||||
|
if(playlist){
|
||||||
|
switch(radio.station.playlist.type){
|
||||||
|
case "radioplay":
|
||||||
|
if(playlist[0] && playlist[0].stationNowPlaying && playlist[0].stationNowPlaying.nowPlayingArtist && playlist[0].stationNowPlaying.nowPlayingTrack){
|
||||||
|
radio.station.track = "__" + playlist[0].stationNowPlaying.nowPlayingArtist + "__" + "\n" + playlist[0].stationNowPlaying.nowPlayingTrack;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "supla":
|
||||||
|
if(playlist.items && playlist.items[0] && playlist.items[0].artist && playlist.items[0].song){
|
||||||
|
radio.station.track = "__" + playlist.items[0].artist + "__" + "\n" + playlist.items[0].song;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "yle":
|
||||||
|
if(playlist.data && playlist.data.performer && playlist.data.title){
|
||||||
|
radio.station.track = "__" + playlist.data.performer + "__" + "\n" + playlist.data.title;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
radio.station.track = "-";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -48,7 +61,14 @@ export default async function play(client: RadioClient, interaction: ChatInputCo
|
|||||||
value: client.messages.replace(client.messages.playDescription2, {
|
value: client.messages.replace(client.messages.playDescription2, {
|
||||||
"%radio.station.track%": radio.station.track != undefined ? "\n\n" + radio.station.track : "-"
|
"%radio.station.track%": radio.station.track != undefined ? "\n\n" + radio.station.track : "-"
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: client.messages.playTitle3,
|
||||||
|
value: client.messages.replace(client.messages.playDescription3, {
|
||||||
|
"%client.funcs.msToTime(completed)%": "-"
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
.setImage('https://waren.io/berriabot-temp-sa7a36a9xm6837br/images/empty-3.png')
|
.setImage('https://waren.io/berriabot-temp-sa7a36a9xm6837br/images/empty-3.png')
|
||||||
.setFooter({
|
.setFooter({
|
||||||
text: client.messages.footerText,
|
text: client.messages.footerText,
|
||||||
@ -88,80 +108,104 @@ export default async function play(client: RadioClient, interaction: ChatInputCo
|
|||||||
);
|
);
|
||||||
|
|
||||||
if(!radio.message){
|
if(!radio.message){
|
||||||
radio.message = await radio.textChannel?.send({ embeds: [embed], components: [buttons] });
|
radio.message = await radio.textChannel?.send({ embeds: [embed], components: [buttons] }) ?? null;
|
||||||
} else {
|
} else {
|
||||||
if(radio.textChannel.id == radio.message.channel.id){
|
if(radio.textChannel?.id == radio.message.channel.id){
|
||||||
radio.message.edit({ embeds: [embed], components: [buttons] });
|
radio.message.edit({ embeds: [embed], components: [buttons] });
|
||||||
} else {
|
} else {
|
||||||
radio.message?.delete();
|
radio.message?.delete();
|
||||||
radio.message = await radio.textChannel?.send({ embeds: [embed], components: [buttons] });
|
radio.message = await radio.textChannel?.send({ embeds: [embed], components: [buttons] }) ?? null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setInterval(async function(){
|
const oldRadio = {...radio};
|
||||||
let changed = false;
|
|
||||||
|
|
||||||
if(radio.station?.playlist?.type == "supla" || radio.station?.playlist?.type == "yle"){
|
let timer : NodeJS.Timeout = setInterval(async function(){
|
||||||
let playlist: any = await fetch(radio.station.playlist.address)
|
const radio = client.radio?.get(guild.id);
|
||||||
|
|
||||||
|
if(!radio || !oldRadio || radio.station.name != oldRadio.station.name) {
|
||||||
|
return clearInterval(timer);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(radio.station.playlist){
|
||||||
|
if(radio.station.playlist.type == "radioplay" || radio.station.playlist.type == "supla" || radio.station.playlist.type == "yle"){
|
||||||
|
let playlist: any = await fetch(radio.station.playlist.address)
|
||||||
.then((response: Response) => response.json())
|
.then((response: Response) => response.json())
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
});
|
});
|
||||||
try {
|
|
||||||
switch(radio.station?.playlist.type){
|
|
||||||
case "supla":
|
|
||||||
if(radio.station.track != playlist.items[0].artist + "\n" + playlist.items[0].song){
|
|
||||||
changed = true;
|
|
||||||
radio.station.track = "__" + playlist.items[0].artist + "__" + "\n" + playlist.items[0].song;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case "yle":
|
|
||||||
radio.station.track = "-";
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
radio.station.track = "-";
|
|
||||||
}
|
|
||||||
} catch(TypeError) {
|
|
||||||
|
|
||||||
|
radio.station.track = "-";
|
||||||
|
|
||||||
|
if(playlist){
|
||||||
|
switch(radio.station.playlist?.type){
|
||||||
|
case "radioplay":
|
||||||
|
if(playlist[0] && playlist[0].stationNowPlaying && playlist[0].stationNowPlaying.nowPlayingArtist && playlist[0].stationNowPlaying.nowPlayingTrack){
|
||||||
|
radio.station.track = "__" + playlist[0].stationNowPlaying.nowPlayingArtist + "__" + "\n" + playlist[0].stationNowPlaying.nowPlayingTrack;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "supla":
|
||||||
|
if(playlist.items && playlist.items[0] && playlist.items[0].artist && playlist.items[0].song){
|
||||||
|
radio.station.track = "__" + playlist.items[0].artist + "__" + "\n" + playlist.items[0].song;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "yle":
|
||||||
|
if(playlist.data && playlist.data.performer && playlist.data.title){
|
||||||
|
radio.station.track = "__" + playlist.data.performer + "__" + "\n" + playlist.data.title;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
radio.station.track = "-";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(changed == true){
|
let date = new Date();
|
||||||
const embed = new EmbedBuilder()
|
radio.currentTime = date.getTime();
|
||||||
.setTitle(client.user?.username || "-")
|
radio.playTime = radio.currentTime - radio.startTime;
|
||||||
.setThumbnail((radio.station.logo || "https://cdn.discordapp.com/emojis/" + client.messages.emojis["play"].replace(/[^0-9]+/g, '')))
|
const completed = (radio.playTime);
|
||||||
.setColor(client.config.embedColor)
|
|
||||||
.addFields({
|
const embed = new EmbedBuilder()
|
||||||
name: client.messages.playTitle1,
|
.setTitle(client.user?.username || "-")
|
||||||
value: client.messages.replace(client.messages.playDescription1, {
|
.setThumbnail((radio.station.logo || "https://cdn.discordapp.com/emojis/" + client.messages.emojis["play"].replace(/[^0-9]+/g, '')))
|
||||||
"%radio.station.name%": radio.station.name,
|
.setColor(client.config.embedColor)
|
||||||
"%radio.station.owner%": radio.station.name != radio.station.owner ? radio.station.owner + "\n" : ""
|
.addFields({
|
||||||
})
|
name: client.messages.playTitle1,
|
||||||
},
|
value: client.messages.replace(client.messages.playDescription1, {
|
||||||
{
|
"%radio.station.name%": radio.station.name,
|
||||||
name: client.messages.playTitle2,
|
"%radio.station.owner%": radio.station.name != radio.station.owner ? radio.station.owner + "\n" : ""
|
||||||
value: client.messages.replace(client.messages.playDescription2, {
|
|
||||||
"%radio.station.track%": radio.station.track != undefined ? "\n\n" + radio.station.track : "-"
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
.setImage('https://waren.io/berriabot-temp-sa7a36a9xm6837br/images/empty-3.png')
|
},
|
||||||
.setFooter({
|
{
|
||||||
text: client.messages.footerText,
|
name: client.messages.playTitle2,
|
||||||
iconURL: "https://cdn.discordapp.com/emojis/" + client.messages.emojis["eximiabots"].replace(/[^0-9]+/g, '')
|
value: client.messages.replace(client.messages.playDescription2, {
|
||||||
});
|
"%radio.station.track%": radio.station.track != undefined ? "\n\n" + radio.station.track : "-"
|
||||||
|
})
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: client.messages.playTitle3,
|
||||||
|
value: client.messages.replace(client.messages.playDescription3, {
|
||||||
|
"%client.funcs.msToTime(completed)%": client.funcs.msToTime(completed)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.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, '')
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
if(!radio.message){
|
if(!radio.message){
|
||||||
radio.message = await radio.textChannel?.send({ embeds: [embed], components: [buttons] });
|
radio.message = await radio.textChannel?.send({ embeds: [embed], components: [buttons] }) ?? null;
|
||||||
|
} else {
|
||||||
|
if(radio.textChannel?.id == radio.message.channel.id){
|
||||||
|
radio.message?.edit({ embeds: [embed], components: [buttons] });
|
||||||
} else {
|
} else {
|
||||||
if(radio.textChannel.id == radio.message.channel.id){
|
radio.message?.delete();
|
||||||
radio.message.edit({ embeds: [embed], components: [buttons] });
|
radio.message = await radio.textChannel?.send({ embeds: [embed], components: [buttons] }) ?? null;
|
||||||
} else {
|
|
||||||
radio.message?.delete();
|
|
||||||
radio.message = await radio.textChannel?.send({ embeds: [embed], components: [buttons] });
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},15000);
|
},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, {
|
||||||
|
@ -16,18 +16,15 @@ 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%",
|
||||||
playTitle2: ":musical_note: Track",
|
playTitle2: ":musical_note: Track",
|
||||||
playDescription2: "%radio.station.track%",
|
playDescription2: "%radio.station.track%",
|
||||||
nowplayingTitle: "Now Playing",
|
playTitle3: ":stopwatch: Duration",
|
||||||
nowplayingDescription: "**%radio.station.name%**" + "\n" + "%radio.station.owner%" + "\n" + "%client.funcs.msToTime(completed)%" + "\n\n" + "%radio.station.track%",
|
playDescription3: "%client.funcs.msToTime(completed)%",
|
||||||
noVoiceChannel: "You need to be in a voice channel to play radio!",
|
noVoiceChannel: "You need to be in a voice channel to play radio!",
|
||||||
noQuery: "You need to use a number or search for a supported station!",
|
noQuery: "You need to use a number or search for a supported station!",
|
||||||
noPermsConnect: "I cannot connect to your voice channel.",
|
noPermsConnect: "I cannot connect to your voice channel.",
|
||||||
|
@ -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",
|
||||||
|
Reference in New Issue
Block a user