shadow1111
shadow1111
DIAdiscord.js - Imagine a boo! 👻
Created by shadow1111 on 6/25/2023 in #djs-questions
tried downgrading to v13 and need help for the third time today.
have an error
6 replies
DIAdiscord.js - Imagine a boo! 👻
Created by shadow1111 on 6/24/2023 in #djs-questions
"config" is not defined
ReferenceError: config is not defined
at Object.<anonymous> (C:\Users\csj25\OneDrive\Desktop\discordbot\src\index.js:11:14)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:23:47
ReferenceError: config is not defined
at Object.<anonymous> (C:\Users\csj25\OneDrive\Desktop\discordbot\src\index.js:11:14)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:23:47
80 replies
DIAdiscord.js - Imagine a boo! 👻
Created by shadow1111 on 6/23/2023 in #djs-questions
I have djs @ v12 just because everything is just getting more hard to learn every new update.
[nodemon] 2.0.22 [nodemon] to restart at any time, enter rs [nodemon] watching path(s): . [nodemon] watching extensions: js,mjs,json [nodemon] starting node src/index.js C:\Users\Joshua\Desktop\discordbot2\src\index.js:11 command(client, 'ping', message => { ^ TypeError: command is not a function
const Discord = require('discord.js');
const config = require('./config.json')
const client = new Discord.Client();
const command = require('./command')


client.on('ready', () => {
console.log`${client.user.tag} is online and ready to go!✅`
})

command(client, 'ping', message => {
message.channel.send('Pong')
})

client.on('message', () => {
})

client.login(config.token);
const Discord = require('discord.js');
const config = require('./config.json')
const client = new Discord.Client();
const command = require('./command')


client.on('ready', () => {
console.log`${client.user.tag} is online and ready to go!✅`
})

command(client, 'ping', message => {
message.channel.send('Pong')
})

client.on('message', () => {
})

client.login(config.token);
177 replies