kazagumo-bun 3.4.0-b
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitattributes +2 -0
- package/.prettierrc +5 -0
- package/LICENSE +21 -0
- package/LICENSE.md +22 -0
- package/README.md +267 -0
- package/SECURITY.md +21 -0
- package/appveyor.yml +24 -0
- package/docs/.nojekyll +1 -0
- package/docs/assets/hierarchy.js +1 -0
- package/docs/assets/highlight.css +99 -0
- package/docs/assets/icons.js +18 -0
- package/docs/assets/icons.svg +1 -0
- package/docs/assets/main.js +60 -0
- package/docs/assets/navigation.js +1 -0
- package/docs/assets/search.js +1 -0
- package/docs/assets/style.css +1633 -0
- package/docs/classes/Kazagumo.Kazagumo.html +307 -0
- package/docs/classes/Managers_KazagumoPlayer.KazagumoPlayer.html +81 -0
- package/docs/classes/Managers_Supports_KazagumoQueue.KazagumoQueue.html +222 -0
- package/docs/classes/Managers_Supports_KazagumoTrack.KazagumoTrack.html +43 -0
- package/docs/classes/Modules_Interfaces.KazagumoError.html +33 -0
- package/docs/classes/Modules_Interfaces.KazagumoPlugin.html +4 -0
- package/docs/classes/Modules_Utils.KazagumoUtils.html +3 -0
- package/docs/classes/Plugins_PlayerMoved.KazagumoPlugin.html +13 -0
- package/docs/enums/Modules_Interfaces.PlayerState.html +7 -0
- package/docs/functions/Modules_Interfaces.escapeRegExp.html +1 -0
- package/docs/hierarchy.html +1 -0
- package/docs/index.html +208 -0
- package/docs/interfaces/Kazagumo.KazagumoEvents.html +40 -0
- package/docs/interfaces/Modules_Interfaces.CreatePlayerOptions.html +21 -0
- package/docs/interfaces/Modules_Interfaces.KazagumoOptions.html +17 -0
- package/docs/interfaces/Modules_Interfaces.KazagumoPlayerOptions.html +9 -0
- package/docs/interfaces/Modules_Interfaces.KazagumoSearchOptions.html +5 -0
- package/docs/interfaces/Modules_Interfaces.KazagumoSearchResult.html +4 -0
- package/docs/interfaces/Modules_Interfaces.Payload.html +4 -0
- package/docs/interfaces/Modules_Interfaces.PlayOptions.html +6 -0
- package/docs/interfaces/Modules_Interfaces.PlayerMovedChannels.html +3 -0
- package/docs/interfaces/Modules_Interfaces.RawTrack.html +4 -0
- package/docs/interfaces/Modules_Interfaces.ResolveOptions.html +4 -0
- package/docs/modules/Index.html +1 -0
- package/docs/modules/Kazagumo.html +1 -0
- package/docs/modules/Managers_KazagumoPlayer.html +1 -0
- package/docs/modules/Managers_Supports_KazagumoQueue.html +1 -0
- package/docs/modules/Managers_Supports_KazagumoTrack.html +1 -0
- package/docs/modules/Modules_Interfaces.html +1 -0
- package/docs/modules/Modules_Plugins.html +1 -0
- package/docs/modules/Modules_Utils.html +1 -0
- package/docs/modules/Plugins_PlayerMoved.html +1 -0
- package/docs/modules.html +1 -0
- package/docs/types/Modules_Interfaces.PlayerMovedState.html +1 -0
- package/docs/types/Modules_Interfaces.SearchEngines.html +1 -0
- package/docs/types/Modules_Interfaces.SearchResultTypes.html +1 -0
- package/docs/types/Modules_Interfaces.YoutubeThumbnail.html +1 -0
- package/docs/types/Modules_Utils.Constructor.html +1 -0
- package/docs/variables/Index.version.html +1 -0
- package/docs/variables/Modules_Interfaces.Events.html +1 -0
- package/docs/variables/Modules_Interfaces.SourceIDs.html +1 -0
- package/docs/variables/Modules_Interfaces.SupportedSources.html +1 -0
- package/docs/variables/Modules_Plugins.default.html +1 -0
- package/eslint.config.mjs +15 -0
- package/package.json +26 -0
- package/src/Index.ts +14 -0
- package/src/Kazagumo.ts +396 -0
- package/src/Managers/KazagumoPlayer.ts +470 -0
- package/src/Managers/Supports/KazagumoQueue.ts +89 -0
- package/src/Managers/Supports/KazagumoTrack.ts +211 -0
- package/src/Modules/EventEmitter.ts +53 -0
- package/src/Modules/Interfaces.ts +204 -0
- package/src/Modules/Plugins.ts +5 -0
- package/src/Modules/Utils.ts +26 -0
- package/src/Plugins/PlayerMoved.ts +54 -0
- package/tsconfig.json +23 -0
- package/tslint.json +3 -0
package/.gitattributes
ADDED
package/.prettierrc
ADDED
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Luigi Colantuono
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/LICENSE.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
|
|
2
|
+
The MIT License (MIT)
|
|
3
|
+
|
|
4
|
+
Copyright (c) 2021 Takiyo Takahashi
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
# Kazagumo
|
|
2
|
+
#### A [Shoukaku](https://github.com/Deivu/Shoukaku) wrapper with built in queue system
|
|
3
|
+
|
|
4
|
+
      
|
|
5
|
+
|
|
6
|
+

|
|
7
|
+
> Kazagumo © Azur Lane
|
|
8
|
+
|
|
9
|
+
## Features:
|
|
10
|
+
|
|
11
|
+
✓ Built-in queue system
|
|
12
|
+
✓ Easy to use
|
|
13
|
+
✓ Plugin system
|
|
14
|
+
✓ Uses shoukaku v4 + capable of Lavalink v4
|
|
15
|
+
✓ Stable _🙏_
|
|
16
|
+
|
|
17
|
+
## Note
|
|
18
|
+
⚠️Please check [Environment](#environment) that Kazagumo 3.2.0 is verified working on. It's recommended to use the latest version of lavalink. If you encounter any problem, try using previous [version](https://www.npmjs.com/package/kazagumo/v/3.1.2). If issue still persist, please [open an issue](https://github.com/Takiyo0/Kazagumo/issues) or ask me in [Discord](https://discord.gg/nPPW2Gzqg2) (I will answer if I have time) ⚠️
|
|
19
|
+
|
|
20
|
+
## Documentation
|
|
21
|
+
Please read the docs first before asking methods
|
|
22
|
+
> Kazagumo; https://takiyo0.github.io/Kazagumo
|
|
23
|
+
> [Shoukaku](https://github.com/Deivu/Shoukaku) by [Deivu](https://github.com/Deivu); https://deivu.github.io/Shoukaku
|
|
24
|
+
|
|
25
|
+
## Installation
|
|
26
|
+
|
|
27
|
+
> npm i kazagumo
|
|
28
|
+
|
|
29
|
+
## Metadata
|
|
30
|
+
|
|
31
|
+
> version: 3.4.0
|
|
32
|
+
> pre-release: false
|
|
33
|
+
> Last build: 11-10-2025 21.20 PM
|
|
34
|
+
|
|
35
|
+
## Environment
|
|
36
|
+
The new lavalink system that separate YouTube plugins made configuration a bit harder. I will list all working environment that's known working.
|
|
37
|
+
|
|
38
|
+
| Environment | Case 1 | Case 2 | Case 3 |
|
|
39
|
+
|----------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------|
|
|
40
|
+
| Lavalink Version | v4.0.7 | v4.0.7 | v4.0.7 |
|
|
41
|
+
| Youtube Plugin Version | v1.7.2 | v1.7.2 | none |
|
|
42
|
+
| [LavaSrc](https://google.com) Plugin Version | v4.1.1 | v4.1.1 | v4.1.1 |
|
|
43
|
+
| Kazagumo Version | v3.2.0 | v3.2.0 | v3.2.0 |
|
|
44
|
+
| Shoukaku Version | v4.1.0 (built-in v3.2.0) | v4.1.0 (built-in v3.2.0) | v4.1.0 (built-in v3.2.0) |
|
|
45
|
+
| Youtube Plugin Config | youtube.oauth.enabled = true<br>youtube.oauth.accessToken = "filled"<br>youtube.oauth.clients = MUSIC,ANDROID_TESTSUITE,WEB | youtube.oauth.enabled = true<br>youtube.oauth.accessToken = "filled"<br>youtube.oauth.clients = MUSIC,ANDROID_TESTSUITE,WEB,TVHTML5EMBEDDED | none |
|
|
46
|
+
| Lavalink Config | server.sources.youtube = false<br>server.sources.youtubeSearchEnabled = false | server.sources.youtube = false<br>server.sources.youtubeSearchEnabled = false | server.sources.youtube = true<br>server.sources.youtubeSearchEnabled = true |
|
|
47
|
+
| LavaSrc Config | lavasrc.sources.youtube = true | lavasrc.sources.youtube = true | lavasrc.sources.youtube = true |
|
|
48
|
+
| **Result** | | | |
|
|
49
|
+
| YouTube Playlist Load* | ✅ | ❌ | ✅ |
|
|
50
|
+
| YouTube Track Load | ✅ | ✅ | ❌ |
|
|
51
|
+
| YouTube Search | ✅ | ✅ | ✅ |
|
|
52
|
+
| LavaSrc Spotify Playlist Load | ✅ | ✅ | ✅ |
|
|
53
|
+
| LavaSrc Spotify Track Load | ✅ | ✅ | ✅ |
|
|
54
|
+
| LavaSrc Spotify Search (spsearch:query)** | ✅ | ✅ | ✅ |
|
|
55
|
+
| **Summary** | ✅ works just fine | ➖ cannot load youtube playlist | ❌ cannot play any track youtube related. including spotify |
|
|
56
|
+
|
|
57
|
+
Note:
|
|
58
|
+
- `*` = youtube playlist load with YouTube plugin requires oauth enabled and accessToken filled and `TVHTML5EMBEDDED` to be removed from oauth clients, since it's the default config
|
|
59
|
+
- `**` = to do that, you need to add `source` option into `SearchOptions`. Example: `kazagumo.search(query, {source: "spsearch:"});` (⚠️you need to include `:` in the last of `spsearch` or anything to replace source)
|
|
60
|
+
|
|
61
|
+
## Plugins
|
|
62
|
+
- Official [spotify plugin](https://npmjs.com/package/kazagumo-spotify)
|
|
63
|
+
> npm i kazagumo-spotify
|
|
64
|
+
- Additional [apple plugin](https://www.npmjs.com/package/kazagumo-apple)
|
|
65
|
+
> npm i kazagumo-apple
|
|
66
|
+
- Additional [filter plugin](https://www.npmjs.com/package/kazagumo-filter)
|
|
67
|
+
> npm i kazagumo-filter
|
|
68
|
+
- Additional [nicovideo.jp plugin](https://www.npmjs.com/package/kazagumo-nico)
|
|
69
|
+
> npm i kazagumo-nico
|
|
70
|
+
- Additional [deezer plugin](https://www.npmjs.com/package/kazagumo-deezer)
|
|
71
|
+
> npm i kazagumo-deezer
|
|
72
|
+
- Stone-Deezer [deezer plugin](https://www.npmjs.com/package/stone-deezer)
|
|
73
|
+
> npm i stone-deezer
|
|
74
|
+
|
|
75
|
+
## Lavalink installation
|
|
76
|
+
> Basically you can follow this [Official Step](https://lavalink.dev/getting-started/index.html)
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
## Changes v2 -> v3
|
|
80
|
+
```javascript
|
|
81
|
+
// You can get ShoukakuPlayer from here
|
|
82
|
+
+ <KazagumoPlayer>.shoukaku
|
|
83
|
+
+ this.player.players.get("69696969696969").shoukaku
|
|
84
|
+
|
|
85
|
+
// Search tracks
|
|
86
|
+
- this.player.getNode().rest.resolve("ytsearch:pretender Official髭男dism") // Shoukaku
|
|
87
|
+
+ this.player.search("pretender Official髭男dism") // Kazagumo
|
|
88
|
+
|
|
89
|
+
// Create a player
|
|
90
|
+
- this.player.getNode().joinChannel(...) // Shoukaku
|
|
91
|
+
+ this.player.createPlayer(...) // Kazagumo
|
|
92
|
+
|
|
93
|
+
// Add a track to the queue. MUST BE A kazagumoTrack, you can get from <KazagumoPlayer>.search()
|
|
94
|
+
+ this.player.players.get("69696969696969").queue.add(kazagumoTrack) // Kazagumo
|
|
95
|
+
|
|
96
|
+
// Play a track
|
|
97
|
+
- this.player.players.get("69696969696969").playTrack(shoukakuTrack) // Shoukaku
|
|
98
|
+
+ this.player.players.get("69696969696969").play() // Kazagumo, take the first song on queue
|
|
99
|
+
+ this.player.players.get("69696969696969").play(kazagumoTrack) // Kazagumo, will unshift current song and forceplay this song
|
|
100
|
+
|
|
101
|
+
// Play previous song
|
|
102
|
+
+ this.player.players.get("69696969696969").play(this.player.players.get("69696969696969").getPrevious()) // Kazagumo, make sure it's not undefined first
|
|
103
|
+
|
|
104
|
+
// Pauses or resumes the player. Control from kazagumoPlayer instead of shoukakuPlayer
|
|
105
|
+
- this.player.players.get("69696969696969").setPaused(true) // Shoukaku
|
|
106
|
+
+ this.player.players.get("69696969696969").pause(true) // Kazagumo
|
|
107
|
+
|
|
108
|
+
// Set filters. Access shoukakuPlayer from <KazagumoPlayer>.player
|
|
109
|
+
- this.player.players.get("69696969696969").setFilters({lowPass: {smoothing: 2}}) // Shoukaku
|
|
110
|
+
+ this.player.players.get("69696969696969").shoukaku.setFilters({lowPass: {smoothing: 2}}) // Kazagumo
|
|
111
|
+
|
|
112
|
+
// Set volume, use Kazagumo's for smoother volume
|
|
113
|
+
- this.player.players.get("69696969696969").setVolume(1) // Shoukaku 100% volume
|
|
114
|
+
+ this.player.players.get("69696969696969").setVolume(100) // Kazagumo 100% volume
|
|
115
|
+
|
|
116
|
+
// Skip the current song
|
|
117
|
+
- this.player.players.get("69696969696969").stopTrack() // Stoptrack basically skip on shoukaku
|
|
118
|
+
+ this.player.players.get("69696969696969").skip() // skip on kazagumo. easier to find :v
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Support
|
|
122
|
+
⚠️ Please read the docs first before asking question ⚠️
|
|
123
|
+
> Kazagumo support server: https://discord.gg/nPPW2Gzqg2 (anywhere lmao)
|
|
124
|
+
> Shoukaku support server: https://discord.gg/FVqbtGu (#development)
|
|
125
|
+
> Report if you found a bug here https://github.com/Takiyo0/Kazagumo/issues/new/choose
|
|
126
|
+
|
|
127
|
+
## Enable playerMoved event
|
|
128
|
+
```javascript
|
|
129
|
+
import { Kazagumo, Payload, Plugins } from "kazagumo";
|
|
130
|
+
|
|
131
|
+
const kazagumo = new Kazagumo({
|
|
132
|
+
...,
|
|
133
|
+
plugins: [new Plugins.PlayerMoved(client)]
|
|
134
|
+
}, Connector, Nodes, ShoukakuOptions)
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## Example bot
|
|
138
|
+
```javascript
|
|
139
|
+
const {Client, GatewayIntentBits} = require('discord.js');
|
|
140
|
+
const {Guilds, GuildVoiceStates, GuildMessages, MessageContent} = GatewayIntentBits;
|
|
141
|
+
const {Connectors} = require("shoukaku");
|
|
142
|
+
const {Kazagumo, KazagumoTrack} = require("../dist");
|
|
143
|
+
|
|
144
|
+
const Nodes = [{
|
|
145
|
+
name: 'owo',
|
|
146
|
+
url: 'localhost:2333',
|
|
147
|
+
auth: 'youshallnotpass',
|
|
148
|
+
secure: false
|
|
149
|
+
}];
|
|
150
|
+
const client = new Client({intents: [Guilds, GuildVoiceStates, GuildMessages, MessageContent]});
|
|
151
|
+
const kazagumo = new Kazagumo({
|
|
152
|
+
defaultSearchEngine: "youtube",
|
|
153
|
+
// MAKE SURE YOU HAVE THIS
|
|
154
|
+
send: (guildId, payload) => {
|
|
155
|
+
const guild = client.guilds.cache.get(guildId);
|
|
156
|
+
if (guild) guild.shard.send(payload);
|
|
157
|
+
}
|
|
158
|
+
}, new Connectors.DiscordJS(client), Nodes);
|
|
159
|
+
|
|
160
|
+
client.on("ready", () => console.log(client.user.tag + " Ready!"));
|
|
161
|
+
|
|
162
|
+
kazagumo.shoukaku.on('ready', (name) => console.log(`Lavalink ${name}: Ready!`));
|
|
163
|
+
kazagumo.shoukaku.on('error', (name, error) => console.error(`Lavalink ${name}: Error Caught,`, error));
|
|
164
|
+
kazagumo.shoukaku.on('close', (name, code, reason) => console.warn(`Lavalink ${name}: Closed, Code ${code}, Reason ${reason || 'No reason'}`));
|
|
165
|
+
kazagumo.shoukaku.on('debug', (name, info) => console.debug(`Lavalink ${name}: Debug,`, info));
|
|
166
|
+
kazagumo.shoukaku.on('disconnect', (name, count) => {
|
|
167
|
+
const players = [...kazagumo.shoukaku.players.values()].filter(p => p.node.name === name);
|
|
168
|
+
players.map(player => {
|
|
169
|
+
kazagumo.destroyPlayer(player.guildId);
|
|
170
|
+
player.destroy();
|
|
171
|
+
});
|
|
172
|
+
console.warn(`Lavalink ${name}: Disconnected`);
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
kazagumo.on("playerStart", (player, track) => {
|
|
176
|
+
client.channels.cache.get(player.textId)?.send({content: `Now playing **${track.title}** by **${track.author}**`})
|
|
177
|
+
.then(x => player.data.set("message", x));
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
kazagumo.on("playerEnd", (player) => {
|
|
181
|
+
player.data.get("message")?.edit({content: `Finished playing`});
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
kazagumo.on("playerEmpty", player => {
|
|
185
|
+
client.channels.cache.get(player.textId)?.send({content: `Destroyed player due to inactivity.`})
|
|
186
|
+
.then(x => player.data.set("message", x));
|
|
187
|
+
player.destroy();
|
|
188
|
+
});
|
|
189
|
+
|
|
190
|
+
client.on("messageCreate", async msg => {
|
|
191
|
+
if (msg.author.bot) return;
|
|
192
|
+
|
|
193
|
+
if (msg.content.startsWith("!play")) {
|
|
194
|
+
const args = msg.content.split(" ");
|
|
195
|
+
const query = args.slice(1).join(" ");
|
|
196
|
+
|
|
197
|
+
const {channel} = msg.member.voice;
|
|
198
|
+
if (!channel) return msg.reply("You need to be in a voice channel to use this command!");
|
|
199
|
+
|
|
200
|
+
let player = await kazagumo.createPlayer({
|
|
201
|
+
guildId: msg.guild.id,
|
|
202
|
+
textId: msg.channel.id,
|
|
203
|
+
voiceId: channel.id,
|
|
204
|
+
volume: 40
|
|
205
|
+
})
|
|
206
|
+
|
|
207
|
+
let result = await kazagumo.search(query, {requester: msg.author});
|
|
208
|
+
if (!result.tracks.length) return msg.reply("No results found!");
|
|
209
|
+
|
|
210
|
+
if (result.type === "PLAYLIST") player.queue.add(result.tracks); // do this instead of using for loop if you want queueUpdate not spammy
|
|
211
|
+
else player.queue.add(result.tracks[0]);
|
|
212
|
+
|
|
213
|
+
if (!player.playing && !player.paused) player.play();
|
|
214
|
+
return msg.reply({content: result.type === "PLAYLIST" ? `Queued ${result.tracks.length} from ${result.playlistName}` : `Queued ${result.tracks[0].title}`});
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
if (msg.content.startsWith("!skip")) {
|
|
218
|
+
let player = kazagumo.players.get(msg.guild.id);
|
|
219
|
+
if (!player) return msg.reply("No player found!");
|
|
220
|
+
player.skip();
|
|
221
|
+
log(msg.guild.id);
|
|
222
|
+
return msg.reply({content: `Skipped to **${player.queue[0]?.title}** by **${player.queue[0]?.author}**`});
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
if (msg.content.startsWith("!forceplay")) {
|
|
226
|
+
let player = kazagumo.players.get(msg.guild.id);
|
|
227
|
+
if (!player) return msg.reply("No player found!");
|
|
228
|
+
const args = msg.content.split(" ");
|
|
229
|
+
const query = args.slice(1).join(" ");
|
|
230
|
+
let result = await kazagumo.search(query, {requester: msg.author});
|
|
231
|
+
if (!result.tracks.length) return msg.reply("No results found!");
|
|
232
|
+
player.play(new KazagumoTrack(result.tracks[0].getRaw(), msg.author));
|
|
233
|
+
return msg.reply({content: `Forced playing **${result.tracks[0].title}** by **${result.tracks[0].author}**`});
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
if (msg.content.startsWith("!previous")) {
|
|
237
|
+
let player = kazagumo.players.get(msg.guild.id);
|
|
238
|
+
if (!player) return msg.reply("No player found!");
|
|
239
|
+
const previous = player.getPrevious(); // we get the previous track without removing it first
|
|
240
|
+
if (!previous) return msg.reply("No previous track found!");
|
|
241
|
+
await player.play(player.getPrevious(true)); // now we remove the previous track and play it
|
|
242
|
+
return msg.reply("Previous!");
|
|
243
|
+
}
|
|
244
|
+
})
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
client.login('');
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
## Known issue
|
|
251
|
+
###### This part should be in kazagumo-spotify but whatever
|
|
252
|
+
- Force playing song from spotify module (player.play(result.tracks[0]); `result.tracks[0]` is from spotify) is currently not working. **ONLY WHEN YOU DO player.play(thing), NOT player.play() OR player.queue.add(new KazagumoTrack(...))** Please use this workaround
|
|
253
|
+
```js
|
|
254
|
+
const { KazagumoTrack } = require("kazagumo"); // CommonJS
|
|
255
|
+
import { KazagumoTrack } from "kazagumo"; // ES6; don't laugh if it's wrong
|
|
256
|
+
|
|
257
|
+
let track = result.tracks[0] // the spotify track
|
|
258
|
+
let convertedTrack = new KazagumoTrack(track.getRaw()._raw, track.author);
|
|
259
|
+
player.play(convertedTrack);
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
## Contributors
|
|
263
|
+
> - Deivu as the owner of Shoukaku
|
|
264
|
+
> Github: https://github.com/Deivu
|
|
265
|
+
>
|
|
266
|
+
> - Takiyo as the owner of this project
|
|
267
|
+
> Github: https://github.com/Takiyo0
|
package/SECURITY.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
## Supported Versions
|
|
4
|
+
|
|
5
|
+
Use this section to tell people about which versions of your project are
|
|
6
|
+
currently being supported with security updates.
|
|
7
|
+
|
|
8
|
+
| Version | Supported |
|
|
9
|
+
| ------- | ------------------ |
|
|
10
|
+
| 5.1.x | :white_check_mark: |
|
|
11
|
+
| 5.0.x | :x: |
|
|
12
|
+
| 4.0.x | :white_check_mark: |
|
|
13
|
+
| < 4.0 | :x: |
|
|
14
|
+
|
|
15
|
+
## Reporting a Vulnerability
|
|
16
|
+
|
|
17
|
+
Use this section to tell people how to report a vulnerability.
|
|
18
|
+
|
|
19
|
+
Tell them where to go, how often they can expect to get an update on a
|
|
20
|
+
reported vulnerability, what to expect if the vulnerability is accepted or
|
|
21
|
+
declined, etc.
|
package/appveyor.yml
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Test against the latest version of this Node.js version
|
|
2
|
+
environment:
|
|
3
|
+
nodejs_version: "16"
|
|
4
|
+
|
|
5
|
+
# Install scripts. (runs after repo cloning)
|
|
6
|
+
install:
|
|
7
|
+
# Get the latest stable version of Node.js or io.js
|
|
8
|
+
- ps: Install-Product node $env:nodejs_version
|
|
9
|
+
# install modules
|
|
10
|
+
- npm install
|
|
11
|
+
|
|
12
|
+
# Post-install test scripts.
|
|
13
|
+
test_script:
|
|
14
|
+
# Output useful info for debugging.
|
|
15
|
+
- node --version
|
|
16
|
+
- npm --version
|
|
17
|
+
# run tests
|
|
18
|
+
- npm run lint
|
|
19
|
+
- npm run format
|
|
20
|
+
- npm run build
|
|
21
|
+
- npm run build:docs
|
|
22
|
+
|
|
23
|
+
# Don't actually build.
|
|
24
|
+
build: off
|
package/docs/.nojekyll
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
window.hierarchyData = "eJydjssKgzAURP9l1tFaBZX8QSmCexEJ5vqgMYHcWGjFfy/iqst2NTDMGc4G71xgyKbI01bA02CoD7OzDLmhyNMjrFoIEnf1VuO6uNqs42wh8JithrympcDqDSR6o5iJL5XTqyHubjaQH1RPHH/D8RQWA3ECkAiso+MtOguBfpqN9mQhmzLJ2l2gTLK/XM4Fd7VRL/KVe5L+TWbf9w9TG2S+"
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--light-hl-0: #008000;
|
|
3
|
+
--dark-hl-0: #6A9955;
|
|
4
|
+
--light-hl-1: #000000;
|
|
5
|
+
--dark-hl-1: #D4D4D4;
|
|
6
|
+
--light-hl-2: #001080;
|
|
7
|
+
--dark-hl-2: #9CDCFE;
|
|
8
|
+
--light-hl-3: #0000FF;
|
|
9
|
+
--dark-hl-3: #569CD6;
|
|
10
|
+
--light-hl-4: #795E26;
|
|
11
|
+
--dark-hl-4: #DCDCAA;
|
|
12
|
+
--light-hl-5: #A31515;
|
|
13
|
+
--dark-hl-5: #CE9178;
|
|
14
|
+
--light-hl-6: #098658;
|
|
15
|
+
--dark-hl-6: #B5CEA8;
|
|
16
|
+
--light-hl-7: #AF00DB;
|
|
17
|
+
--dark-hl-7: #CE92A4;
|
|
18
|
+
--light-hl-8: #0070C1;
|
|
19
|
+
--dark-hl-8: #4FC1FF;
|
|
20
|
+
--light-hl-9: #000000FF;
|
|
21
|
+
--dark-hl-9: #D4D4D4;
|
|
22
|
+
--light-hl-10: #267F99;
|
|
23
|
+
--dark-hl-10: #4EC9B0;
|
|
24
|
+
--light-code-background: #FFFFFF;
|
|
25
|
+
--dark-code-background: #1E1E1E;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@media (prefers-color-scheme: light) { :root {
|
|
29
|
+
--hl-0: var(--light-hl-0);
|
|
30
|
+
--hl-1: var(--light-hl-1);
|
|
31
|
+
--hl-2: var(--light-hl-2);
|
|
32
|
+
--hl-3: var(--light-hl-3);
|
|
33
|
+
--hl-4: var(--light-hl-4);
|
|
34
|
+
--hl-5: var(--light-hl-5);
|
|
35
|
+
--hl-6: var(--light-hl-6);
|
|
36
|
+
--hl-7: var(--light-hl-7);
|
|
37
|
+
--hl-8: var(--light-hl-8);
|
|
38
|
+
--hl-9: var(--light-hl-9);
|
|
39
|
+
--hl-10: var(--light-hl-10);
|
|
40
|
+
--code-background: var(--light-code-background);
|
|
41
|
+
} }
|
|
42
|
+
|
|
43
|
+
@media (prefers-color-scheme: dark) { :root {
|
|
44
|
+
--hl-0: var(--dark-hl-0);
|
|
45
|
+
--hl-1: var(--dark-hl-1);
|
|
46
|
+
--hl-2: var(--dark-hl-2);
|
|
47
|
+
--hl-3: var(--dark-hl-3);
|
|
48
|
+
--hl-4: var(--dark-hl-4);
|
|
49
|
+
--hl-5: var(--dark-hl-5);
|
|
50
|
+
--hl-6: var(--dark-hl-6);
|
|
51
|
+
--hl-7: var(--dark-hl-7);
|
|
52
|
+
--hl-8: var(--dark-hl-8);
|
|
53
|
+
--hl-9: var(--dark-hl-9);
|
|
54
|
+
--hl-10: var(--dark-hl-10);
|
|
55
|
+
--code-background: var(--dark-code-background);
|
|
56
|
+
} }
|
|
57
|
+
|
|
58
|
+
:root[data-theme='light'] {
|
|
59
|
+
--hl-0: var(--light-hl-0);
|
|
60
|
+
--hl-1: var(--light-hl-1);
|
|
61
|
+
--hl-2: var(--light-hl-2);
|
|
62
|
+
--hl-3: var(--light-hl-3);
|
|
63
|
+
--hl-4: var(--light-hl-4);
|
|
64
|
+
--hl-5: var(--light-hl-5);
|
|
65
|
+
--hl-6: var(--light-hl-6);
|
|
66
|
+
--hl-7: var(--light-hl-7);
|
|
67
|
+
--hl-8: var(--light-hl-8);
|
|
68
|
+
--hl-9: var(--light-hl-9);
|
|
69
|
+
--hl-10: var(--light-hl-10);
|
|
70
|
+
--code-background: var(--light-code-background);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
:root[data-theme='dark'] {
|
|
74
|
+
--hl-0: var(--dark-hl-0);
|
|
75
|
+
--hl-1: var(--dark-hl-1);
|
|
76
|
+
--hl-2: var(--dark-hl-2);
|
|
77
|
+
--hl-3: var(--dark-hl-3);
|
|
78
|
+
--hl-4: var(--dark-hl-4);
|
|
79
|
+
--hl-5: var(--dark-hl-5);
|
|
80
|
+
--hl-6: var(--dark-hl-6);
|
|
81
|
+
--hl-7: var(--dark-hl-7);
|
|
82
|
+
--hl-8: var(--dark-hl-8);
|
|
83
|
+
--hl-9: var(--dark-hl-9);
|
|
84
|
+
--hl-10: var(--dark-hl-10);
|
|
85
|
+
--code-background: var(--dark-code-background);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.hl-0 { color: var(--hl-0); }
|
|
89
|
+
.hl-1 { color: var(--hl-1); }
|
|
90
|
+
.hl-2 { color: var(--hl-2); }
|
|
91
|
+
.hl-3 { color: var(--hl-3); }
|
|
92
|
+
.hl-4 { color: var(--hl-4); }
|
|
93
|
+
.hl-5 { color: var(--hl-5); }
|
|
94
|
+
.hl-6 { color: var(--hl-6); }
|
|
95
|
+
.hl-7 { color: var(--hl-7); }
|
|
96
|
+
.hl-8 { color: var(--hl-8); }
|
|
97
|
+
.hl-9 { color: var(--hl-9); }
|
|
98
|
+
.hl-10 { color: var(--hl-10); }
|
|
99
|
+
pre, code { background: var(--code-background); }
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
(function() {
|
|
2
|
+
addIcons();
|
|
3
|
+
function addIcons() {
|
|
4
|
+
if (document.readyState === "loading") return document.addEventListener("DOMContentLoaded", addIcons);
|
|
5
|
+
const svg = document.body.appendChild(document.createElementNS("http://www.w3.org/2000/svg", "svg"));
|
|
6
|
+
svg.innerHTML = `<g id="icon-1" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-module)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">M</text></g><g id="icon-2" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-module)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">M</text></g><g id="icon-4" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">N</text></g><g id="icon-8" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">E</text></g><g id="icon-16" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-property)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">P</text></g><g id="icon-32" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-variable)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">V</text></g><g id="icon-64" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">F</text></g><g id="icon-128" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">C</text></g><g id="icon-256" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">I</text></g><g id="icon-512" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-constructor)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">C</text></g><g id="icon-1024" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-property)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">P</text></g><g id="icon-2048" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-method)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">M</text></g><g id="icon-4096" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">F</text></g><g id="icon-8192" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-property)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">P</text></g><g id="icon-16384" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-constructor)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">C</text></g><g id="icon-32768" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-property)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">P</text></g><g id="icon-65536" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">T</text></g><g id="icon-131072" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">T</text></g><g id="icon-262144" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-accessor)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">A</text></g><g id="icon-524288" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-accessor)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">A</text></g><g id="icon-1048576" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-accessor)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">A</text></g><g id="icon-2097152" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">T</text></g><g id="icon-4194304" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-reference)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">R</text></g><g id="icon-8388608" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-document)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><g stroke="var(--color-icon-text)" fill="none" stroke-width="1.5"><polygon points="6,5 6,19 18,19, 18,10 13,5"></polygon><line x1="9" y1="9" x2="13" y2="9"></line><line x1="9" y1="12" x2="15" y2="12"></line><line x1="9" y1="15" x2="15" y2="15"></line></g></g><g id="icon-folder" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-document)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><g stroke="var(--color-icon-text)" fill="none" stroke-width="1.5"><polygon points="5,5 10,5 12,8 19,8 19,18 5,18"></polygon></g></g><g id="icon-chevronDown" class="tsd-no-select"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-icon-text)"></path></g><g id="icon-chevronSmall" class="tsd-no-select"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-icon-text)"></path></g><g id="icon-checkbox" class="tsd-no-select"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></g><g id="icon-menu" class="tsd-no-select"><rect x="1" y="3" width="14" height="2" fill="var(--color-icon-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-icon-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-icon-text)"></rect></g><g id="icon-search" class="tsd-no-select"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-icon-text)"></path></g><g id="icon-anchor" class="tsd-no-select"><g stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></g></g><g id="icon-alertNote" class="tsd-no-select"><path fill="var(--color-alert-note)" d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></g><g id="icon-alertTip" class="tsd-no-select"><path fill="var(--color-alert-tip)" d="M8 1.5c-2.363 0-4 1.69-4 3.75 0 .984.424 1.625.984 2.304l.214.253c.223.264.47.556.673.848.284.411.537.896.621 1.49a.75.75 0 0 1-1.484.211c-.04-.282-.163-.547-.37-.847a8.456 8.456 0 0 0-.542-.68c-.084-.1-.173-.205-.268-.32C3.201 7.75 2.5 6.766 2.5 5.25 2.5 2.31 4.863 0 8 0s5.5 2.31 5.5 5.25c0 1.516-.701 2.5-1.328 3.259-.095.115-.184.22-.268.319-.207.245-.383.453-.541.681-.208.3-.33.565-.37.847a.751.751 0 0 1-1.485-.212c.084-.593.337-1.078.621-1.489.203-.292.45-.584.673-.848.075-.088.147-.173.213-.253.561-.679.985-1.32.985-2.304 0-2.06-1.637-3.75-4-3.75ZM5.75 12h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM6 15.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5h-2.5a.75.75 0 0 1-.75-.75Z"></path></g><g id="icon-alertImportant" class="tsd-no-select"><path fill="var(--color-alert-important)" d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></g><g id="icon-alertWarning" class="tsd-no-select"><path fill="var(--color-alert-warning)" d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></g><g id="icon-alertCaution" class="tsd-no-select"><path fill="var(--color-alert-caution)" d="M4.47.22A.749.749 0 0 1 5 0h6c.199 0 .389.079.53.22l4.25 4.25c.141.14.22.331.22.53v6a.749.749 0 0 1-.22.53l-4.25 4.25A.749.749 0 0 1 11 16H5a.749.749 0 0 1-.53-.22L.22 11.53A.749.749 0 0 1 0 11V5c0-.199.079-.389.22-.53Zm.84 1.28L1.5 5.31v5.38l3.81 3.81h5.38l3.81-3.81V5.31L10.69 1.5ZM8 4a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></g>`;
|
|
7
|
+
svg.style.display = "none";
|
|
8
|
+
if (location.protocol === "file:") updateUseElements();
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function updateUseElements() {
|
|
12
|
+
document.querySelectorAll("use").forEach(el => {
|
|
13
|
+
if (el.getAttribute("href").includes("#icon-")) {
|
|
14
|
+
el.setAttribute("href", el.getAttribute("href").replace(/.*#/, "#"));
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
})()
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg"><g id="icon-1" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-module)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">M</text></g><g id="icon-2" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-module)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">M</text></g><g id="icon-4" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">N</text></g><g id="icon-8" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">E</text></g><g id="icon-16" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-property)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">P</text></g><g id="icon-32" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-variable)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">V</text></g><g id="icon-64" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">F</text></g><g id="icon-128" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">C</text></g><g id="icon-256" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">I</text></g><g id="icon-512" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-constructor)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">C</text></g><g id="icon-1024" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-property)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">P</text></g><g id="icon-2048" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-method)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">M</text></g><g id="icon-4096" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">F</text></g><g id="icon-8192" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-property)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">P</text></g><g id="icon-16384" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-constructor)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">C</text></g><g id="icon-32768" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-property)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">P</text></g><g id="icon-65536" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">T</text></g><g id="icon-131072" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">T</text></g><g id="icon-262144" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-accessor)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">A</text></g><g id="icon-524288" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-accessor)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">A</text></g><g id="icon-1048576" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-accessor)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">A</text></g><g id="icon-2097152" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">T</text></g><g id="icon-4194304" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-reference)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">R</text></g><g id="icon-8388608" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-document)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><g stroke="var(--color-icon-text)" fill="none" stroke-width="1.5"><polygon points="6,5 6,19 18,19, 18,10 13,5"></polygon><line x1="9" y1="9" x2="13" y2="9"></line><line x1="9" y1="12" x2="15" y2="12"></line><line x1="9" y1="15" x2="15" y2="15"></line></g></g><g id="icon-folder" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-document)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><g stroke="var(--color-icon-text)" fill="none" stroke-width="1.5"><polygon points="5,5 10,5 12,8 19,8 19,18 5,18"></polygon></g></g><g id="icon-chevronDown" class="tsd-no-select"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-icon-text)"></path></g><g id="icon-chevronSmall" class="tsd-no-select"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-icon-text)"></path></g><g id="icon-checkbox" class="tsd-no-select"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></g><g id="icon-menu" class="tsd-no-select"><rect x="1" y="3" width="14" height="2" fill="var(--color-icon-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-icon-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-icon-text)"></rect></g><g id="icon-search" class="tsd-no-select"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-icon-text)"></path></g><g id="icon-anchor" class="tsd-no-select"><g stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></g></g><g id="icon-alertNote" class="tsd-no-select"><path fill="var(--color-alert-note)" d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></g><g id="icon-alertTip" class="tsd-no-select"><path fill="var(--color-alert-tip)" d="M8 1.5c-2.363 0-4 1.69-4 3.75 0 .984.424 1.625.984 2.304l.214.253c.223.264.47.556.673.848.284.411.537.896.621 1.49a.75.75 0 0 1-1.484.211c-.04-.282-.163-.547-.37-.847a8.456 8.456 0 0 0-.542-.68c-.084-.1-.173-.205-.268-.32C3.201 7.75 2.5 6.766 2.5 5.25 2.5 2.31 4.863 0 8 0s5.5 2.31 5.5 5.25c0 1.516-.701 2.5-1.328 3.259-.095.115-.184.22-.268.319-.207.245-.383.453-.541.681-.208.3-.33.565-.37.847a.751.751 0 0 1-1.485-.212c.084-.593.337-1.078.621-1.489.203-.292.45-.584.673-.848.075-.088.147-.173.213-.253.561-.679.985-1.32.985-2.304 0-2.06-1.637-3.75-4-3.75ZM5.75 12h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM6 15.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5h-2.5a.75.75 0 0 1-.75-.75Z"></path></g><g id="icon-alertImportant" class="tsd-no-select"><path fill="var(--color-alert-important)" d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></g><g id="icon-alertWarning" class="tsd-no-select"><path fill="var(--color-alert-warning)" d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></g><g id="icon-alertCaution" class="tsd-no-select"><path fill="var(--color-alert-caution)" d="M4.47.22A.749.749 0 0 1 5 0h6c.199 0 .389.079.53.22l4.25 4.25c.141.14.22.331.22.53v6a.749.749 0 0 1-.22.53l-4.25 4.25A.749.749 0 0 1 11 16H5a.749.749 0 0 1-.53-.22L.22 11.53A.749.749 0 0 1 0 11V5c0-.199.079-.389.22-.53Zm.84 1.28L1.5 5.31v5.38l3.81 3.81h5.38l3.81-3.81V5.31L10.69 1.5ZM8 4a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></g></svg>
|