how do i get guild.id


vijat6856

I'm putting together a class with proper permissions, but I need some kind of guild ID. How can i get the guild server id by the user who wrote this command

    if (message.channel.type === "text" && message.guild && message.guild.ownerID == message.author.id) {
        if (content.startsWith("*install")) {
            let server = message.guild.id[guild.id];
            guild1.createChannel('new-category', {
                type: 'category',
                permissionsOverwrites: [{
                  id: guild.id,
                  deny: ['MANAGE_MESSAGES'],
                  allow: ['SEND_MESSAGES']
                }]
              })
                .then(console.log)
                .catch(console.error);
        }
    }
whisper

you can use itmessage.guild.id

if (message.channel.type === "text" && message.guild && message.guild.ownerID == message.author.id) {
        if (content.startsWith("*install")) {
            
            guild1.createChannel('new-category', {
                type: 'category',
                permissionsOverwrites: [{
                  id: message.guild.id,
                  deny: ['MANAGE_MESSAGES'],
                  allow: ['SEND_MESSAGES']
                }]
              })
                .then(console.log)
                .catch(console.error);
        }
    }

Related


how do i get guild.id

vijat6856 I'm putting together a class with proper permissions, but I need some kind of guild ID. How can i get the guild server id by the user who wrote this command if (message.channel.type === "text" && message.guild && message.guild.ownerID == message.

how do i get guild.id

vijat6856 I'm putting together a class with proper permissions, but I need some kind of guild ID. How can i get the guild server id by the user who wrote this command if (message.channel.type === "text" && message.guild && message.guild.ownerID == message.

how do i get guild.id

vijat6856 I'm putting together a class with proper permissions, but I need some kind of guild ID. How can i get the guild server id by the user who wrote this command if (message.channel.type === "text" && message.guild && message.guild.ownerID == message.

how do i get guild.id

vijat6856 I'm putting together a class with proper permissions, but I need some kind of guild ID. How can i get the guild server id by the user who wrote this command if (message.channel.type === "text" && message.guild && message.guild.ownerID == message.

how do i get guild.id

vijat6856 I'm putting together a class with proper permissions, but I need some kind of guild ID. How can i get the guild server id by the user who wrote this command if (message.channel.type === "text" && message.guild && message.guild.ownerID == message.

how do i get guild.id

vijat6856 I'm putting together a class with proper permissions, but I need some kind of guild ID. How can i get the guild server id by the user who wrote this command if (message.channel.type === "text" && message.guild && message.guild.ownerID == message.

How can i get the current guild id in on_member_join

weinus I am making a bot that can be used on 3 to 4 servers, I am preparing a welcome message. I saw this post: Discord.py welcome message for multiple servers, that's what it does, but there are some bugs and I'm doing my thing. But in the end I'm stuck with

How can i get the current guild id in on_member_join

weinus I am making a bot that can be used on 3 to 4 servers, I am preparing a welcome message. I saw this post: Discord.py welcome message for multiple servers, that's what it does, but there are some bugs and I'm doing my thing. But in the end I'm stuck with

How can i get the current guild id in on_member_join

weinus I am making a bot that can be used on 3 to 4 servers, I am preparing a welcome message. I saw this post: Discord.py welcome message for multiple servers, that's what it does, but there are some bugs and I'm doing my thing. But in the end I'm stuck with

How can i get the current guild id in on_member_join

weinus I am making a bot that can be used on 3 to 4 servers, I am preparing a welcome message. I saw this post: Discord.py welcome message for multiple servers, that's what it does, but there are some bugs and I'm doing my thing. But in the end I'm stuck with

How can i get the current guild id in on_member_join

weinus I am making a bot that can be used on 3 to 4 servers, I am preparing a welcome message. I saw this article: Discord.py welcome message for multiple servers, that's what it does, but there are some bugs and I'm doing my thing. But in the end I'm stuck wi

How can i get the current guild id in on_member_join

weinus I am making a bot that can be used on 3 to 4 servers, I am preparing a welcome message. I saw this article: Discord.py welcome message for multiple servers, that's what it does, but there are some bugs and I'm doing my thing. But in the end I'm stuck wi

How can i get the current guild id in on_member_join

weinus I am making a bot that can be used on 3 to 4 servers, I am preparing a welcome message. I saw this article: Discord.py welcome message for multiple servers, that's what it does, but there are some bugs and I'm doing my thing. But in the end I'm stuck wi

How do I define the guild to use ".channels" on?

b I'm setting up a bot analyst channel for my inconsistent bot's support server. I want the bot to be able to send a message and then edit it every minute. However, when I try to do this, I get an error saying that the guild to use is not defined .channels. Th

Undefined every time I want to get guild by id

Shustrick Every time I try to understand which row will appear under a certain ID with this code: const Discord = require('discord.js'); const client = new Discord.Client(); const prefix = "!"; //guild const cacheGuild = client.guilds.cache.get("6861665144786

Undefined every time I want to get guild by id

Shustrick Every time I try to understand which row will appear under a certain ID with this code: const Discord = require('discord.js'); const client = new Discord.Client(); const prefix = "!"; //guild const cacheGuild = client.guilds.cache.get("6861665144786

How to get the ID of joining a guild in Discord.js

n212: I need the bot to get the guild id when joining the api. Currently, I've tried this, but I get the error: Cannot read property 'id' of undefined My password client.on("guildCreate", (guild) => { request( { url: "https://urlgoeshere" +

How to get the guild ID of a joined user/member (Discord.js)

Chloride client.on("guildMemberAdd", member => { settingss.findOne({ guildID: guild.ID // <---- Trying to figure out what i want over here }, async (err, settings) => { var role = member.guild.roles.cache.get(role => role.name === settingss.joinrolenam

How to get the guild ID of a joined user/member (Discord.js)

Chloride client.on("guildMemberAdd", member => { settingss.findOne({ guildID: guild.ID // <---- Trying to figure out what i want over here }, async (err, settings) => { var role = member.guild.roles.cache.get(role => role.name === settingss.joinrolenam

How to get the guild ID of a joined user/member (Discord.js)

Chloride client.on("guildMemberAdd", member => { settingss.findOne({ guildID: guild.ID // <---- Trying to figure out what i want over here }, async (err, settings) => { var role = member.guild.roles.cache.get(role => role.name === settingss.joinrolenam

How to get the guild ID of a joined user/member (Discord.js)

Chloride client.on("guildMemberAdd", member => { settingss.findOne({ guildID: guild.ID // <---- Trying to figure out what i want over here }, async (err, settings) => { var role = member.guild.roles.cache.get(role => role.name === settingss.joinrolenam

How to get the guild ID of a joined user/member (Discord.js)

Chloride client.on("guildMemberAdd", member => { settingss.findOne({ guildID: guild.ID // <---- Trying to figure out what i want over here }, async (err, settings) => { var role = member.guild.roles.cache.get(role => role.name === settingss.joinrolenam

How to get the guild ID of a joined user/member (Discord.js)

Chloride client.on("guildMemberAdd", member => { settingss.findOne({ guildID: guild.ID // <---- Trying to figure out what i want over here }, async (err, settings) => { var role = member.guild.roles.cache.get(role => role.name === settingss.joinrolenam

How to get the guild ID of a joined user/member (Discord.js)

Chloride client.on("guildMemberAdd", member => { settingss.findOne({ guildID: guild.ID // <---- Trying to figure out what i want over here }, async (err, settings) => { var role = member.guild.roles.cache.get(role => role.name === settingss.joinrolenam

How do I see how many people are in the guild my bot is in?

fatal lethality I'm trying to see how many users my bot can interact with (eg how many users are in the guild my bot is in) module.exports.run = async (bot, message, args) => { if (!message.member.id === 'myid') return; message.channel.send(`Watching

How do I see how many people are in the guild my bot is in?

fatal lethality I'm trying to see how many users my bot can interact with (eg how many users are in the guild my bot is in) module.exports.run = async (bot, message, args) => { if (!message.member.id === 'myid') return; message.channel.send(`Watching

How do I see how many people are in the guild my bot is in?

fatal lethality I'm trying to see how many users my bot can interact with (eg how many users are in the guild my bot is in) module.exports.run = async (bot, message, args) => { if (!message.member.id === 'myid') return; message.channel.send(`Watching

How do I see how many people are in the guild my bot is in?

fatal lethality I'm trying to see how many users my bot can interact with (eg how many users are in the guild my bot is in) module.exports.run = async (bot, message, args) => { if (!message.member.id === 'myid') return; message.channel.send(`Watching

How do I see how many people are in the guild my bot is in?

fatal lethality I'm trying to see how many users my bot can interact with (eg how many users are in the guild my bot is in) module.exports.run = async (bot, message, args) => { if (!message.member.id === 'myid') return; message.channel.send(`Watching