This commit is contained in:
parent
3f7864be1b
commit
ddb85f10d8
0
mydb.sqlite
Normal file
0
mydb.sqlite
Normal file
@ -72,7 +72,7 @@ export default class DiscordController extends EventEmitter {
|
|||||||
|
|
||||||
client.on(Events.VoiceStateUpdate, async (oldState: VoiceState, newState: VoiceState) => {
|
client.on(Events.VoiceStateUpdate, async (oldState: VoiceState, newState: VoiceState) => {
|
||||||
// check if user joined a vc
|
// check if user joined a vc
|
||||||
if (!oldState.channelId && newState.channelId) {
|
if (!oldState.channelId && newState.channelId || oldState.channelId != newState.channelId) {
|
||||||
// check if right vc
|
// check if right vc
|
||||||
if (newState.channelId === config.discord.vchannelIdForTwo || newState.channelId === config.discord.vchannelIdForThree || newState.channelId === config.discord.vchannelIdForFour || newState.channelId === config.discord.vchannelIdForGroup) {
|
if (newState.channelId === config.discord.vchannelIdForTwo || newState.channelId === config.discord.vchannelIdForThree || newState.channelId === config.discord.vchannelIdForFour || newState.channelId === config.discord.vchannelIdForGroup) {
|
||||||
const channel = newState.channel;
|
const channel = newState.channel;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user