micup.ts 1.1.0 → 1.1.1
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/README.md +2 -2
- package/README.tr.md +2 -2
- package/docs/migrating.md +2 -2
- package/docs/voice.md +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -66,7 +66,7 @@ await client.newSession({ handler: events.handle }).run({ signal: stop.signal })
|
|
|
66
66
|
| Discovery | Read, apply for, edit and withdraw a server discovery listing | `client.discovery` |
|
|
67
67
|
| Events | A typed catalog of Gateway events, an event mux and handler wrappers | `EventMux`, `knownGatewayEvents`, `safeHandler()` |
|
|
68
68
|
| Helpers | Constant groups, button and select builders, command option readers, permission helpers, mentions, timestamps, snowflakes, localized message catalogs | `ChannelType`, `primaryButton()`, `optionString()`, `permissionNames()` |
|
|
69
|
-
| Voice playback | LiveKit audio with FFmpeg decoding, PCM player and a connection object with events | [`@
|
|
69
|
+
| Voice playback | LiveKit audio with FFmpeg decoding, PCM player and a connection object with events | [`@micup.ts/voice`](packages/voice) |
|
|
70
70
|
|
|
71
71
|
Everything takes an optional `AbortSignal`. HTTP failures throw `MicupAPIError` with `status`, `code`, field errors, `retryAfter` and helpers such as `notFound`, `rateLimited` and `hasFieldCode()`. `MicupErrorCode` names the error codes.
|
|
72
72
|
|
|
@@ -114,7 +114,7 @@ const client = await MicupClient.connect({
|
|
|
114
114
|
|
|
115
115
|
## Voice
|
|
116
116
|
|
|
117
|
-
[`@
|
|
117
|
+
[`@micup.ts/voice`](packages/voice) publishes audio to a voice channel through LiveKit. `VoiceConnection` joins the channel, plays files, URLs, streams or raw PCM, and emits `start`, `finish`, `status`, `memberJoin`, `memberLeave`, `disconnect` and `error`. Install it with `npm install @micup.ts/voice` and install FFmpeg to decode files and streams.
|
|
118
118
|
|
|
119
119
|
## Documentation
|
|
120
120
|
|
package/README.tr.md
CHANGED
|
@@ -66,7 +66,7 @@ await client.newSession({ handler: events.handle }).run({ signal: stop.signal })
|
|
|
66
66
|
| Keşif | Sunucu keşif kaydını okuma, başvuru, düzenleme ve geri çekme | `client.discovery` |
|
|
67
67
|
| Olaylar | Tipli Gateway olay kataloğu, olay çoklayıcı ve işleyici sarmalayıcıları | `EventMux`, `knownGatewayEvents`, `safeHandler()` |
|
|
68
68
|
| Yardımcılar | Sabit grupları, buton ve seçim menüsü oluşturucular, komut seçeneği okuyucuları, izin yardımcıları, etiketleme, zaman damgası, snowflake, yerelleştirilmiş mesaj kataloğu | `ChannelType`, `primaryButton()`, `optionString()`, `permissionNames()` |
|
|
69
|
-
| Ses çalma | FFmpeg çözmeli LiveKit sesi, PCM oynatıcı ve olay yayan bağlantı nesnesi | [`@
|
|
69
|
+
| Ses çalma | FFmpeg çözmeli LiveKit sesi, PCM oynatıcı ve olay yayan bağlantı nesnesi | [`@micup.ts/voice`](packages/voice) |
|
|
70
70
|
|
|
71
71
|
Her çağrı isteğe bağlı `AbortSignal` alır. HTTP hataları `status`, `code`, alan hataları, `retryAfter` ve `notFound`, `rateLimited`, `hasFieldCode()` gibi yardımcılarla `MicupAPIError` olarak gelir. Hata kodlarının adları `MicupErrorCode` içindedir.
|
|
72
72
|
|
|
@@ -114,7 +114,7 @@ const client = await MicupClient.connect({
|
|
|
114
114
|
|
|
115
115
|
## Ses
|
|
116
116
|
|
|
117
|
-
[`@
|
|
117
|
+
[`@micup.ts/voice`](packages/voice) sesi LiveKit üzerinden ses kanalına yayınlar. `VoiceConnection` kanala girer; dosya, URL, akış veya ham PCM çalar ve `start`, `finish`, `status`, `memberJoin`, `memberLeave`, `disconnect`, `error` olaylarını yayar. `npm install @micup.ts/voice` ile kurun; dosya ve akışları çözmek için FFmpeg kurun.
|
|
118
118
|
|
|
119
119
|
## Dokümantasyon
|
|
120
120
|
|
package/docs/migrating.md
CHANGED
|
@@ -13,7 +13,7 @@ micup.ts is lower level than discord.js-style libraries: you create the client,
|
|
|
13
13
|
| Raw call | `client.rest('GET', '/users/@me')` | `client.request('GET', '/users/@me')` |
|
|
14
14
|
| Buttons and menus | emulated with reactions (micup.js) | real components: `actionRow(primaryButton(...))`, `selectRow(stringSelect(...))` |
|
|
15
15
|
| Slash commands | not available (micup.js) or `client.rest.createGlobalApplicationCommand` | `client.commands.create/set` and an `InteractionRouter` |
|
|
16
|
-
| Voice | `connection.play(url)` | `VoiceConnection.connect(session, guildId, channelId)` then `connection.play(url)` from `@
|
|
16
|
+
| Voice | `connection.play(url)` | `VoiceConnection.connect(session, guildId, channelId)` then `connection.play(url)` from `@micup.ts/voice` |
|
|
17
17
|
| Presence | `client.setPresence(...)` | `session.setStatus()` and `session.setCustomStatus()` |
|
|
18
18
|
| Shards | not available | `client.newShardManager()` |
|
|
19
19
|
|
|
@@ -39,6 +39,6 @@ The concepts match; the names are closer to the wire format.
|
|
|
39
39
|
| `EmbedBuilder` | `EmbedBuilder` with `.title()`, `.description()`, `.field()`, `.build()` |
|
|
40
40
|
| `PermissionsBitField` | `Permission` (bigint masks), `permissionNames()`, `hasPermissions()` |
|
|
41
41
|
| `ShardingManager` | `client.newShardManager()` |
|
|
42
|
-
| `@discordjs/voice` | `@
|
|
42
|
+
| `@discordjs/voice` | `@micup.ts/voice` (LiveKit) |
|
|
43
43
|
|
|
44
44
|
Micup does not have polls, auto moderation rules, scheduled events, stage channels or bulk bans.
|
package/docs/voice.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# Voice
|
|
2
2
|
|
|
3
|
-
Micup carries voice over LiveKit. micup.ts joins a voice channel through the Gateway and gives you a short-lived grant; the optional [`@
|
|
3
|
+
Micup carries voice over LiveKit. micup.ts joins a voice channel through the Gateway and gives you a short-lived grant; the optional [`@micup.ts/voice`](../packages/voice) package connects to LiveKit with that grant and publishes audio.
|
|
4
4
|
|
|
5
5
|
```sh
|
|
6
|
-
npm install @
|
|
6
|
+
npm install @micup.ts/voice
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
Install FFmpeg to decode files, URLs and streams. You can skip it if you only play raw PCM. The package supports unencrypted rooms; a grant with `e2ee_key` or `p2p` is refused.
|
|
@@ -13,7 +13,7 @@ Install FFmpeg to decode files, URLs and streams. You can skip it if you only pl
|
|
|
13
13
|
`VoiceConnection` joins, connects, owns a player and leaves when it closes.
|
|
14
14
|
|
|
15
15
|
```js
|
|
16
|
-
import { VoiceConnection } from '@
|
|
16
|
+
import { VoiceConnection } from '@micup.ts/voice';
|
|
17
17
|
|
|
18
18
|
const session = client.newSession({
|
|
19
19
|
handler: events.handle,
|
package/package.json
CHANGED