added sounds

This commit is contained in:
MathMan05 2024-10-14 12:55:35 -05:00
parent 5cdb4d2184
commit 83116bad5c
3 changed files with 36 additions and 1 deletions

View file

@ -149,4 +149,4 @@ app.listen(PORT, ()=>{
console.log(`Server running on port ${PORT}`);
});
export{ getApiUrls };
export{ getApiUrls };

View file

@ -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(){

View file

@ -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(){