summary refs log tree commit diff
path: root/util/src/entities/VoiceState.ts
diff options
context:
space:
mode:
authorAlTech98 <altech123159@gmail.com>2021-09-02 19:33:04 +0200
committerAlTech98 <altech123159@gmail.com>2021-09-02 19:33:04 +0200
commit9dac7ddf9eb43c4fac263d00b0208e6d337506fd (patch)
treefe50372026cc776e30ae36ed349553c2d3179ad4 /util/src/entities/VoiceState.ts
parent:art: update openapi title (diff)
downloadserver-9dac7ddf9eb43c4fac263d00b0208e6d337506fd.tar.xz
VOICE_STATE_UPDATE implementation, fix #210
Diffstat (limited to 'util/src/entities/VoiceState.ts')
-rw-r--r--util/src/entities/VoiceState.ts12
1 files changed, 12 insertions, 0 deletions
diff --git a/util/src/entities/VoiceState.ts b/util/src/entities/VoiceState.ts
index c5040cf1..7975273b 100644
--- a/util/src/entities/VoiceState.ts
+++ b/util/src/entities/VoiceState.ts
@@ -3,7 +3,9 @@ import { BaseClass } from "./BaseClass";
 import { Channel } from "./Channel";
 import { Guild } from "./Guild";
 import { User } from "./User";
+import {Member} from "./Member";
 
+//https://gist.github.com/vassjozsef/e482c65df6ee1facaace8b3c9ff66145#file-voice_state-ex
 @Entity("voice_states")
 export class VoiceState extends BaseClass {
 	@Column({ nullable: true })
@@ -30,9 +32,16 @@ export class VoiceState extends BaseClass {
 	@ManyToOne(() => User)
 	user: User;
 
+	@JoinColumn({ name: "user_id" })
+	@ManyToOne(() => Member)
+	member: Member;
+
 	@Column()
 	session_id: string;
 
+	@Column({ nullable: true })
+	token: string;
+
 	@Column()
 	deaf: boolean;
 
@@ -53,4 +62,7 @@ export class VoiceState extends BaseClass {
 
 	@Column()
 	suppress: boolean; // whether this user is muted by the current user
+
+	@Column({ nullable: true , default: null})
+	request_to_speak_timestamp?: Date
 }