diff --git a/src/index.ts b/src/index.ts index 3bbe747..882a219 100644 --- a/src/index.ts +++ b/src/index.ts @@ -149,4 +149,4 @@ app.listen(PORT, ()=>{ console.log(`Server running on port ${PORT}`); }); -export{ getApiUrls }; \ No newline at end of file +export{ getApiUrls }; diff --git a/src/webpage/audio.ts b/src/webpage/audio.ts index 9c096d2..13b90ce 100644 --- a/src/webpage/audio.ts +++ b/src/webpage/audio.ts @@ -146,6 +146,38 @@ class AVoice{ }, 150); break; } + case "join":{ + const voicy = new AVoice("triangle", 600,.1); + voicy.play(); + setTimeout(_=>{ + voicy.freq=800; + }, 75); + setTimeout(_=>{ + voicy.freq=1000; + }, 150); + setTimeout(_=>{ + voicy.stop(); + }, 200); + break; + } + case "leave":{ + const voicy = new AVoice("triangle", 850,.5); + voicy.play(); + setTimeout(_=>{ + voicy.freq=700; + }, 100); + setTimeout(_=>{ + voicy.stop(); + voicy.freq=400; + }, 180); + setTimeout(_=>{ + voicy.play(); + }, 200); + setTimeout(_=>{ + voicy.stop(); + }, 250); + break; + } } } static get sounds(){ diff --git a/src/webpage/channel.ts b/src/webpage/channel.ts index 7d2fe0f..4968268 100644 --- a/src/webpage/channel.ts +++ b/src/webpage/channel.ts @@ -595,6 +595,9 @@ class Channel extends SnowFlake{ await Member.new(memb,this.guild); } this.updateVoiceUsers(); + if(this.voice===this.localuser.currentVoice){ + AVoice.noises("join"); + } } } async updateVoiceUsers(){