Показать сообщение отдельно
  #1 (permalink)  
Старый 29.11.2019, 22:25
Новичок на форуме
Отправить личное сообщение для Nexus72 Посмотреть профиль Найти все сообщения от Nexus72
 
Регистрация: 29.11.2019
Сообщений: 1

Проблема с кодом
const Discord = module.require('discord.js')
module.exports.run = async (VoiceChannel, bot, message, args) => {
	if(message.member.VoiceChannelID === undefined)return message.channel.send('>>> **ембед** тип в канал зайди');
	let channel = message.guild.channels.get(message.member.VoiceChannelID);
	let member = message.mentions.members.first();
	if(!member)return message.channel.send('>>> **ембед** тип чела не указал');
	member.setMute(true);
	if(!member.voiceMutes) member.voiceMutes = new Array();
	member.voiceMutes.push(channel);
	message.channel.send('>>> **ембед** усё успешно')
	
}
module.exports.help = {
	name: 'voicemute',
	aliases: ['войсмут']
}


Ошибка в следующем
(node:780) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'VoiceChannelID' of undefined
at Object.module.exports.run (/app/cmds/voicemute.js:3:20)
at Client.bot.on (/app/bot.js:370:18)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:780) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:780) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Ответить с цитированием