#guildCreate

1 messages · Page 1 of 1 (latest)

patent shell
#

lets continue here

#

can you show the full code please

random ferry
#

alright

#
const Discord = require('discord.js');
const { Client, Permissions } = require('discord.js');
const bot = new Client({
  intents: [
    'GUILDS',
    'GUILD_MESSAGES'
  ],
  restRequestTimeout: 30000
});
bot.login(Token);
bot.on("ready", () => {
  process.stdout.write('\033c');
  console.log();
  console.log("Opperational")
});


bot.on("guildCreate", (guild) => {
  console.log("here")

  // Get server informatiom based on their server id
  bot.guilds.cache.get(guild.id).fetch().then((guild) => {
    console.info(guild.invites);
  });
});
buoyant adder
#

You need to initialize new Client

#

And login

random ferry
#

those 2 have already been done

#

hold on

#

edited the one above

buoyant adder
#

Does the ready event fires

random ferry
#

yes

#

not really sure why the 'guideCreate' event isnt firing

#

i've kicked and reinvited my bot to the same server 3 times xD

ornate geode
#

For completion sake, can you add a messageCreate event listener and see if that actually does function when you send a message in a guild the bot is in? It should, based on intents. (As should guildCreate, which for some reason does not seem to function)

random ferry
#

technically i did but i just shortened it here to be viewed easier.
Chat commands work

#

well i stand corrected

#

after testing again

#

it doesnt work

#

chat commands dont work anymore

#

Help.

#

imma reinstall discord.js module and try again

#

Okay i would like to apologize for the waste of time, i have discovered i entered a different bot token and was kicking the wrong one

ornate geode
#

Happens, good luck 👍

random ferry
#

I appreciated the help