This repository was archived by the owner on Dec 31, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig-autoadd.js
126 lines (117 loc) · 5.06 KB
/
config-autoadd.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
const wait = require(`node:timers/promises`).setTimeout; // eslint-disable-line no-unused-vars
/* Information about afterAdd functions:
*
* - they don't have to return anything
* - the arguments should be (client, interaction, queue, QueueRepeatMode)
* - if no function is used, a default function will be used instead
*
*/
/* Scheme of a proper object:
*
* {
* internalId: 'internalId', // STRING: an unique internal ID to identify this, 1-100 characters (necessary)
* isMix: false, // BOOLEAN: whether or not this is a mix (necassary)
* content: [], // ARRAY OF STRINGS: an array of URLs [for isMix=false] or of internal IDs [for isMix=true] (necessary)
* createCommand: true, // BOOLEAN: whether or not a command choice will be created, if false it can only be used in a mix (necessary)
* commandTitle: "commandTitle", // STRING: title of the command choice, 1-100 characters (necessary for createCommand=true)
* afterAdd: null // FUNCTION: function that is run after adding the tracks [for createCommand=true] (not necessary)
* }
*
*/
const playlistprep = async (client, interaction, queue, QueueRepeatMode) => {
// shuffle:
await queue.tracks.shuffle();
interaction.followUp({ content: `Queue has been shuffled! ✅` }).catch((e) => {});
// loop queue:
await queue.setRepeatMode(QueueRepeatMode.QUEUE);
const success = (queue.repeatMode === QueueRepeatMode.QUEUE);
success ?
interaction.followUp({ content: `Loop Mode: **${queue.repeatMode === 0 ? `Inactive` : `Active`}**, the whole queue will be repeated indefinetely 🔁` }).catch((e) => {}) :
interaction.followUp({ content: `${interaction.member.user}, could not update loop mode! ❌`, ephemeral: true }).catch((e) => {});
// skip:
await queue.node.skip();
// shuffle:
await queue.tracks.shuffle();
};
const singleprep = async (client, interaction, queue, QueueRepeatMode) => {
// loop track:
await queue.setRepeatMode(QueueRepeatMode.TRACK);
const success = (queue.repeatMode === QueueRepeatMode.TRACK);
success ?
interaction.followUp({ content: `Loop Mode: **${queue.repeatMode === 0 ? `Inactive` : `Active`}**, the current track will be repeated indefinetely 🔂` }).catch((e) => {}) :
interaction.followUp({ content: `${interaction.member.user}, could not update loop mode! ❌`, ephemeral: true }).catch((e) => {});
};
module.exports = [
{
internalId: `toadSingsRasputin`,
isMix: false,
content: [`https://www.youtube.com/watch?v=KT85z_tGZro`],
createCommand: true,
commandTitle: `Toad Sings Ra Ra Rasputin`,
afterAdd: singleprep
},
{
internalId: `undertaleBossOst`,
isMix: false,
content: [`https://www.youtube.com/playlist?list=PLvJE24xlovhuuhaQInNsjRyRF8QdFnh6V`],
createCommand: true,
commandTitle: `Undertale OST (only boss fights)`,
afterAdd: playlistprep
},
{
internalId: `undertaleRemixes`,
isMix: false,
content: [`https://soundcloud.com/gamechops/sets/undertale`],
createCommand: true,
commandTitle: `Undertale Remix Playlist`,
afterAdd: playlistprep
},
{
internalId: `undertaleBoth`,
isMix: true,
content: [`undertaleBossOst`, `undertaleRemixes`],
createCommand: true,
commandTitle: `Undertale (Boss OST & Remixes)`,
afterAdd: playlistprep
},
{
internalId: `hypixelSkyblockOst`,
isMix: false,
content: [`https://www.youtube.com/playlist?list=PLPYaA8L35a72GLLbbMKc2v8D-AHPDFXsV`],
createCommand: true,
commandTitle: `Hypixel Skyblock OST`,
afterAdd: playlistprep
},
{
internalId: `stardewValleySeasonThemes`,
isMix: false,
content: [`https://www.youtube.com/playlist?list=PLUJm0mJ_TgqoABH9idm_tX8eV1o0Jv4iG`],
createCommand: true,
commandTitle: `Stardew Valley Season Themes`,
afterAdd: playlistprep
},
{
internalId: `nintendoAndChill`, // https://open.spotify.com/intl-de/artist/1T7zBkQCOCacKjbnmFX7cp/discography/album
isMix: false,
content: [`https://open.spotify.com/intl-de/album/4lBMa9JEuCSIs3NkPEIwvN?si=z25t1nqmQEe78ttSvO9QyQ`, `https://open.spotify.com/intl-de/album/3oNO1P0Qlr4oSlMA2MIj67?si=ydDtluOOQr-RSAfIbocFag`, `https://open.spotify.com/intl-de/album/0N0noai9OQs1rYEaS47vJw?si=RAmn0gOGRBm9EexcGMjFPQ`, `https://open.spotify.com/intl-de/album/2a15PtLwMSfMVOWJUcM4Ia?si=E-pYcPWTQMOUW00HPIQIKg`], // [`https://soundcloud.com/mikeljakobi/sets/poke-chill`, `https://soundcloud.com/gamechops/sets/zelda-chill`, `https://soundcloud.com/daniel-egan-16/sets/zelda-and-chill-2`, `https://soundcloud.com/pokegamer05/sets/zelda-and-chill-3`],
createCommand: true,
commandTitle: `Nintendo and Chill (Poké & Chill, Zelda & Chill 1-3)`,
afterAdd: playlistprep
},
{
internalId: `undertale-hypixel-stardewvalley`,
isMix: true,
content: [`undertaleBoth`, `hypixelSkyblockOst`, `stardewValleySeasonThemes`],
createCommand: true,
commandTitle: `Undertale (both) + Hypixel Skyblock OST + Stardew Valley`,
afterAdd: playlistprep
},
{
internalId: `playlistAll`,
isMix: true,
content: [`undertaleBoth`, `hypixelSkyblockOst`, `nintendoAndChill`, `stardewValleySeasonThemes`],
createCommand: true,
commandTitle: `everything (Undertale, Hypixel Skyblock, ...)`,
afterAdd: playlistprep
}
];