Replies: 1 comment 2 replies
-
const { Client } = require('discord.js-selfbot-v13');
const client = new Client();
client.on('ready', async () => {
console.log(`logged in as ${client.user.displayName}`);
});
client.on('messageCreate', async message => {
if (message.author.id !== client.user.id) return;
if (message.content === '!ping') {
await message.channel.send('pong!');
}
});
client.login("YOUR TOKEN HERE")
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
My code doesn't work. Even though it's a simple code like this, if I type !ping, I don't get any messages
`const { Client } = require('discord.js-selfbot-v13');
const client = new Client();
const token = 'token';
client.on('ready', async () => {
console.log(
logged in as ${client.user.tag}
);});
client.on('messageCreate', async message => {
if (message.author.id === client.user.id) {
if (message.content === '!ping') {
await message.channel.send('pong!');
}
}
});
client.on('error', error => {
console.error('ERROR:', error);
});
client.login(token);
`
Pls help
Beta Was this translation helpful? Give feedback.
All reactions