mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2026-01-10 03:35:42 +00:00
Compare commits
2 Commits
develop
...
copilot/fi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aff9a67e2c | ||
|
|
ff8d6bc273 |
20
package-lock.json
generated
20
package-lock.json
generated
@@ -1,19 +1,19 @@
|
||||
{
|
||||
"name": "eximiabots-radiox",
|
||||
"version": "0.5.14",
|
||||
"version": "0.5.13",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "eximiabots-radiox",
|
||||
"version": "0.5.14",
|
||||
"version": "0.5.13",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@discordjs/voice": "^0.19.0",
|
||||
"@snazzah/davey": "^0.1.9",
|
||||
"discord.js": "^14.25.1",
|
||||
"dotenv": "^17.2.3",
|
||||
"libsodium-wrappers": "^0.8.0",
|
||||
"libsodium-wrappers": "^0.7.16",
|
||||
"path": "^0.12.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -646,18 +646,18 @@
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/libsodium": {
|
||||
"version": "0.8.0",
|
||||
"resolved": "https://registry.npmjs.org/libsodium/-/libsodium-0.8.0.tgz",
|
||||
"integrity": "sha512-GQ4Sg0/Z0Ui6ZvKeTd8bH7VAAqk1ZHZDAo/pcuSi0uPbIN6LYAAotR0GEYb8v+y4/tSsXZPr06D6hhqKd7tnoQ==",
|
||||
"version": "0.7.16",
|
||||
"resolved": "https://registry.npmjs.org/libsodium/-/libsodium-0.7.16.tgz",
|
||||
"integrity": "sha512-3HrzSPuzm6Yt9aTYCDxYEG8x8/6C0+ag655Y7rhhWZM9PT4NpdnbqlzXhGZlDnkgR6MeSTnOt/VIyHLs9aSf+Q==",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/libsodium-wrappers": {
|
||||
"version": "0.8.0",
|
||||
"resolved": "https://registry.npmjs.org/libsodium-wrappers/-/libsodium-wrappers-0.8.0.tgz",
|
||||
"integrity": "sha512-PVyXAtP1nmpQrDKAVnA8pir0f7bj7vmMGs7mb+0OCSJ+BOfLNBb5hPy2GHfrx6cQ+Co9fMliR5R0WRbVuMllNA==",
|
||||
"version": "0.7.16",
|
||||
"resolved": "https://registry.npmjs.org/libsodium-wrappers/-/libsodium-wrappers-0.7.16.tgz",
|
||||
"integrity": "sha512-Gtr/WBx4dKjvRL1pvfwZqu7gO6AfrQ0u9vFL+kXihtHf6NfkROR8pjYWn98MFDI3jN19Ii1ZUfPR9afGiPyfHg==",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"libsodium": "^0.8.0"
|
||||
"libsodium": "^0.7.16"
|
||||
}
|
||||
},
|
||||
"node_modules/lodash": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "eximiabots-radiox",
|
||||
"version": "0.5.14",
|
||||
"version": "0.5.13",
|
||||
"description": "Internet Radio to your Discord guild",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
@@ -22,7 +22,7 @@
|
||||
"@snazzah/davey": "^0.1.9",
|
||||
"discord.js": "^14.25.1",
|
||||
"dotenv": "^17.2.3",
|
||||
"libsodium-wrappers": "^0.8.0",
|
||||
"libsodium-wrappers": "^0.7.16",
|
||||
"path": "^0.12.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -10,6 +10,7 @@ export interface radio {
|
||||
connection: VoiceConnection | undefined,
|
||||
message: Message | null,
|
||||
station: station,
|
||||
track?: string,
|
||||
datastore?: datastore,
|
||||
currentTime?: number,
|
||||
startTime: number,
|
||||
|
||||
@@ -11,7 +11,6 @@ export interface station {
|
||||
type: "radioplay" | "supla" | "yle",
|
||||
address: string | string
|
||||
}
|
||||
track?: string;
|
||||
}
|
||||
|
||||
export default class Stations extends Array {
|
||||
|
||||
@@ -20,27 +20,27 @@ export default async function play(client: RadioClient, interaction: ChatInputCo
|
||||
.catch(error => {
|
||||
});
|
||||
|
||||
radio.station.track = "-";
|
||||
radio.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;
|
||||
radio.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;
|
||||
radio.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;
|
||||
radio.track = "__" + playlist.data.performer + "__" + "\n" + playlist.data.title;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
radio.station.track = "-";
|
||||
radio.track = "-";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -60,7 +60,7 @@ export default async function play(client: RadioClient, interaction: ChatInputCo
|
||||
{
|
||||
name: client.messages.playTitle2,
|
||||
value: client.messages.replace(client.messages.playDescription2, {
|
||||
"%radio.station.track%": radio.station.track != undefined ? "\n\n" + radio.station.track : "-"
|
||||
"%radio.station.track%": radio.track != undefined ? "\n\n" + radio.track : "-"
|
||||
})
|
||||
},
|
||||
{
|
||||
@@ -135,27 +135,27 @@ export default async function play(client: RadioClient, interaction: ChatInputCo
|
||||
.catch(error => {
|
||||
});
|
||||
|
||||
radio.station.track = "-";
|
||||
radio.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;
|
||||
radio.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;
|
||||
radio.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;
|
||||
radio.track = "__" + playlist.data.performer + "__" + "\n" + playlist.data.title;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
radio.station.track = "-";
|
||||
radio.track = "-";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -180,7 +180,7 @@ export default async function play(client: RadioClient, interaction: ChatInputCo
|
||||
{
|
||||
name: client.messages.playTitle2,
|
||||
value: client.messages.replace(client.messages.playDescription2, {
|
||||
"%radio.station.track%": radio.station.track != undefined ? "\n\n" + radio.station.track : "-"
|
||||
"%radio.station.track%": radio.track != undefined ? "\n\n" + radio.track : "-"
|
||||
})
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user