Ja som po návod na discord.js,, takže lístok topánok. Mám dvakrát skontrolovať, a ja som stále rovnaká chyba:
TypeError: kanál.updateOverwrite nie je funkcia
Díval som sa cez všetky StackOverflow otázky, ktoré by som mohol nájsť, ale nikto pracoval pre mňa. Ja som tiež preskúmať trochu hlbšie mimo TAK, stále nie je pomoc. Tu je môj kód:
module.exports = {
name: 'ticket',
description: 'Open a ticket!',
async execute(client, message, args, cmd, Discord) {
// creates tickets
let channel = await message.guild.channels.create(
`ticket: ${message.author.tag}`,
{ type: 'text' }
);
await channel.setParent('912495738947260446');
// updates channel perms
channel.updateOverwrite(message.guild.id, {
SEND_MESSAGE: false,
VIEW_CHANNEL: false
});
channel.updateOverwrite(message.author, {
SEND_MESSAGE: true,
VIEW_CHANNEL: true
});
const reactionMessage = await channel.send('Thanks for opening a ticket! A staff member will be with you shortly. While you are here, please tell us why you opened this ticket.');
try {
await reactionMessage.react("
1