ticketbot | Ticket bot used in Dank Memer Official | Runtime Evironment library
kandi X-RAY | ticketbot Summary
kandi X-RAY | ticketbot Summary
Ticket bot used in Dank Memer Official
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ticketbot
ticketbot Key Features
ticketbot Examples and Code Snippets
Community Discussions
Trending Discussions on ticketbot
QUESTION
I would like to know why message.guild.channels.cache is not a function Of course there is a sequel but I show that the main one. If you want the rest, just ask me! ;-; I seriously need your help, you reading my post!
...ANSWER
Answered 2020-Aug-08 at 15:15client.on("message", async (message) => {
if (message.author.bot || message.channel.type == "dm") return false;
const args = message.content.toLowerCase().split(" ");
if (args[0] == "!ticket") {
if (!message.guild.me.hasPermission("MANAGE_CHANNELS") || !message.guild.me.hasPermission("MANAGE_ROLES")) return message.channel.send("Not enough permissions I require the `MANAGE_CHANNELS` and `MANAGE_ROLES` permission!");
const TicketCategory = message.guild.channels.cache.find(channel => channel.name == "Open Tickets");
if (!TicketCategory) {
message.guild.channels.create("Open Tickets", {
type: "category",
// READ_MESSAGES is not a valid permission flag in Discord JS v12.
// Use READ_MESSAGE_HISTORY or VIEW_CHANNEL.
permissionOverwrites: [{id: message.guild.roles.everyone, deny: ["READ_MESSAGE_HISTORY"]}]
}).catch(e => console.log(e));
}
}
});
QUESTION
I have the below code which is intended to create a new channel with a name. This works fine. It then needs to set the permissions of the channel to making it VIEW_CHANNEL false for all users. It then needs to overwrite permissions for the message author to grant them VIEW_CHANNEL. Im getting stuck on how to make the permissions apply on the channel just created.
...ANSWER
Answered 2018-Jul-06 at 14:59The below code works :)
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ticketbot
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page