VOICE_STATE_UPDATE implementation, fix #210
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
export function genSessionId() {
|
||||
return genRanHex(32)
|
||||
}
|
||||
|
||||
export function genVoiceToken() {
|
||||
return genRanHex(16)
|
||||
}
|
||||
|
||||
function genRanHex(size: number) {
|
||||
return [...Array(size)].map(() => Math.floor(Math.random() * 16).toString(16)).join('');
|
||||
}
|
||||
@@ -6,6 +6,7 @@ import { Channel } from "amqplib";
|
||||
interface WebSocket extends WS {
|
||||
version: number;
|
||||
user_id: string;
|
||||
session_id: string;
|
||||
encoding: "etf" | "json";
|
||||
compress?: "zlib-stream";
|
||||
shard_count?: bigint;
|
||||
|
||||
Reference in New Issue
Block a user