#and you re saying that if you use
1 messages · Page 1 of 1 (latest)
Please add the following code to your code base outside of any other event listeners and provide the full log output relevant to your issue.
client
.on("debug", console.log)
.on("warn", console.log)
• Note: if you initialize your Client as bot or other identifiers you need to use these instead of client
• If the output is too long to post consider using a bin instead: gist | hasteb.in | sourceb.in | hastebin
i changed to file name and it didnt work
oops wrong tag
lol
that wouldn't help anyway
If you aren't getting any errors, try to place console.log checkpoints throughout your code to find out where execution stops.
• Once you do, log relevant values and if-conditions
• More sophisticated debugging methods are breakpoints and runtime inspections: learn more
ok
could you show your messageCreate event? and your client constructor
client.on('messageCreate', (message) => {
const prefix = ">";
if(message.author.bot || !message.content.startsWith(prefix)) return;
const args = message.content.slice(prefix.length).split(/ +/)
const cmd = args.shift().toLowerCase()
const command = client.commands.get(cmd)
console.log(1)
if(command) command.execute(client, message, args)
})
client constructor?
const intents = Discord.GatewayIntentBits
const client = new Discord.Client({ intents: [intents.GuildBans,
intents.Guilds,
intents.MessageContent,
intents.DirectMessages,
intents.GuildMembers,
intents.GuildInvites,
intents.GuildMessages,
]})