client.guilds.forEach(guild => {
let user = client.users.get(guild.ownerID);
if (typeof user !== 'undefined') {
user.createDM().then((channel) => {
displayDMChannel(channel);
readDM(channel.id)
})
}
});
voiceChannelMembers.forEach(function(val, key) {
if (client.user.id === key) inTheCall = true;
});
this.bot.on('guildUnavailable', async (guild) => {
guild.members.filter(member => this.onlinePlayers.has(member.id + member.guild.id))
.forEach(member => this.onlinePlayers.delete(member.id + member.guild.id));
});
process.on('SIGINT', () => {
client.guilds.forEach(guild => {
if (client.playerManager.get(guild)) client.playerManager.leave(guild);
});
process.exit();
});