cat neko
cat neko
DIAdiscord.js - Imagine an app
Created by cat neko on 8/20/2023 in #djs-questions
my bot cannot be connect to discord
Okk
40 replies
DIAdiscord.js - Imagine an app
Created by cat neko on 8/20/2023 in #djs-questions
my bot cannot be connect to discord
I have the message
the app is not responding
the app is not responding
on my discord server
40 replies
DIAdiscord.js - Imagine an app
Created by cat neko on 8/20/2023 in #djs-questions
my bot cannot be connect to discord
ok
40 replies
DIAdiscord.js - Imagine an app
Created by cat neko on 8/20/2023 in #djs-questions
my bot cannot be connect to discord
ok
40 replies
DIAdiscord.js - Imagine an app
Created by cat neko on 8/20/2023 in #djs-questions
my bot cannot be connect to discord
but how can i fix it
40 replies
DIAdiscord.js - Imagine an app
Created by cat neko on 8/20/2023 in #djs-questions
my bot cannot be connect to discord
ok
40 replies
DIAdiscord.js - Imagine an app
Created by cat neko on 8/20/2023 in #djs-questions
my bot cannot be connect to discord
i can chose the command but she not work
40 replies
DIAdiscord.js - Imagine an app
Created by cat neko on 8/20/2023 in #djs-questions
my bot cannot be connect to discord
I see the success message but the command don't work
40 replies
DIAdiscord.js - Imagine an app
Created by cat neko on 8/20/2023 in #djs-questions
my bot cannot be connect to discord
Ok
40 replies
DIAdiscord.js - Imagine an app
Created by cat neko on 8/20/2023 in #djs-questions
my bot cannot be connect to discord
That not come from the code, just my bot and discord I think. Because my bot is online but the command don't reply to my slash
40 replies
DIAdiscord.js - Imagine an app
Created by cat neko on 8/20/2023 in #djs-questions
my bot cannot be connect to discord
I try
40 replies
DIAdiscord.js - Imagine an app
Created by cat neko on 8/20/2023 in #djs-questions
my bot cannot be connect to discord
The application don't work
40 replies
DIAdiscord.js - Imagine an app
Created by cat neko on 8/20/2023 in #djs-questions
my bot cannot be connect to discord
Couldn't connect to discord via RCP: error: could not connect
40 replies
DIAdiscord.js - Imagine an app
Created by cat neko on 8/20/2023 in #djs-questions
my bot cannot be connect to discord
I don't have an error.
40 replies
DIAdiscord.js - Imagine an app
Created by cat neko on 8/20/2023 in #djs-questions
my bot cannot be connect to discord
const fs = require('node:fs');
const path = require('node:path');

const { Client, Events, GatewayIntentBits, Collection } = require('discord.js');

// Create a new client instance
const client = new Client({ intents: [GatewayIntentBits.Guilds] });

const { token } = require('./config.json');

client.commands = new Collection();
const foldersPath = path.join(__dirname, 'commands');
const commandFolders = fs.readdirSync(foldersPath);

for (const folder of commandFolders) {
const commandsPath = path.join(foldersPath, folder);
const commandFiles = fs.readdirSync(commandsPath).filter(file => file.endsWith('.js'));
for (const file of commandFiles) {
const filePath = path.join(commandsPath, file);
const command = require(filePath);
// Set a new item in the Collection with the key as the command name and the value as the exported module
if ('data' in command && 'execute' in command) {
client.commands.set(command.data.name, command);
} else {
console.log(`[WARNING] The command at ${filePath} is missing a required "data" or "execute" property.`);
}
}




}

client.once(Events.ClientReady, c => {
console.log(`Ready! Logged in as ${c.user.tag}`);
});

client.on(Events.InteractionCreate, interaction => {
if (!interaction.isChatInputCommand()) return;
console.log(interaction)
});



client.login(token);
const fs = require('node:fs');
const path = require('node:path');

const { Client, Events, GatewayIntentBits, Collection } = require('discord.js');

// Create a new client instance
const client = new Client({ intents: [GatewayIntentBits.Guilds] });

const { token } = require('./config.json');

client.commands = new Collection();
const foldersPath = path.join(__dirname, 'commands');
const commandFolders = fs.readdirSync(foldersPath);

for (const folder of commandFolders) {
const commandsPath = path.join(foldersPath, folder);
const commandFiles = fs.readdirSync(commandsPath).filter(file => file.endsWith('.js'));
for (const file of commandFiles) {
const filePath = path.join(commandsPath, file);
const command = require(filePath);
// Set a new item in the Collection with the key as the command name and the value as the exported module
if ('data' in command && 'execute' in command) {
client.commands.set(command.data.name, command);
} else {
console.log(`[WARNING] The command at ${filePath} is missing a required "data" or "execute" property.`);
}
}




}

client.once(Events.ClientReady, c => {
console.log(`Ready! Logged in as ${c.user.tag}`);
});

client.on(Events.InteractionCreate, interaction => {
if (!interaction.isChatInputCommand()) return;
console.log(interaction)
});



client.login(token);
, but i don't have error, i just have the message Couldn't connect to Discord via RPC: Error: Could not connect comment faire
40 replies
DIAdiscord.js - Imagine an app
Created by cat neko on 8/20/2023 in #djs-questions
my bot cannot be connect to discord
ok
40 replies