Answer the question
In order to leave comments, you need to log in
Discord js - Bot not responding to messages, what could I have done wrong?
The bot does not respond to messages in any way.
Nothing in the console except Logged in as "bot name" The
bot is on a vps with Ubuntu 20.04 64bit
Node version 16.13.2
At the same time, the bot is online
Code:
const { Client, Intents } = require('discord.js');
const client = new Client({ intents: [Intents.FLAGS.GUILDS] });
client.on('ready', () => {
console.log(`Logged in as ${client.user.tag}!`);
});
client.on('interactionCreate', async interaction => {
if (!interaction.isCommand()) return;
if (interaction.commandName === 'ping') {
await interaction.reply('Pong!');
}
});
client.login('тут мой токен(с ним проблем нет)');
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question