Merge branch 'dev' into 'main'
Dev See merge request illegitimate/illegitimate-bot!281
This commit is contained in:
@@ -13,7 +13,7 @@ services:
|
|||||||
- HYPIXELAPIKEY=${HYPIXELAPIKEY}
|
- HYPIXELAPIKEY=${HYPIXELAPIKEY}
|
||||||
- REDISURI=${REDISURI}
|
- REDISURI=${REDISURI}
|
||||||
- POSTGRESURI=${POSTGRESURI}
|
- POSTGRESURI=${POSTGRESURI}
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
pull_policy: always
|
pull_policy: always
|
||||||
db:
|
db:
|
||||||
|
|||||||
18
src/events/server/voiceStateUpdate/updatecache.ts
Normal file
18
src/events/server/voiceStateUpdate/updatecache.ts
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
import { VoiceState } from "discord.js"
|
||||||
|
import { IEvent } from "interfaces"
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "updatecache",
|
||||||
|
description: "Updates the voice states cache",
|
||||||
|
event: "voiceStateUpdate",
|
||||||
|
|
||||||
|
async execute(_o: VoiceState, n: VoiceState) {
|
||||||
|
const guild = n.guild
|
||||||
|
|
||||||
|
if (!guild) return
|
||||||
|
|
||||||
|
if (!n.channel) {
|
||||||
|
guild.voiceStates.cache.delete(n.id)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} as IEvent
|
||||||
Reference in New Issue
Block a user