#The client.on('ready') event will not work
1 messages · Page 1 of 1 (latest)
So, basically what happened, it does not log anything in the welcome event.
Use pastebin
because for mobile users (like me) I have to download the file to view it
ah
Pastebin
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
here
Line 9 won't work
Because your client isn't logged in by that time
no
use where you need it
for example if you need it in a message command then declare it inside the messageCreate event
and do you see any error in console? Because the code seems fine
Nope.
Its just empty
weird
My ascii table isn't showing up either.
OH
I fINALLY GOT AN ERROR
/Users/ahmed/Desktop/Arkansas-Utilities/Handlers/Events.js:10
(await PG(`${process.cwd()}/Events/*/*.js`)).map(async (file) => {
^
TypeError: (intermediate value) is not a function
at module.exports (/Users/ahmed/Desktop/Arkansas-Utilities/Handlers/Events.js:10:5)
the code is
const { Events } = require("../Validation/EventNames")
const { promisify } = require('util')
const { glob } = require('glob')
const PG = promisify(glob)
const Ascii = require('ascii-table')
module.exports = async (client) => {
const Table = new Ascii("Events Loaded")
(await PG(`${process.cwd()}/Events/*/*.js`)).map(async (file) => {
const event = require(file)
if (!Events.includes(event.name) || !event.name) {
const L = file.split("/")
await Table.addRow(`${event.name || "MISSING"}`, `⛔️ Event name is either invalid or missing: ${L[6] + "/" + L[7]}`)
return
}
if (event.once) {
client.once(event.name, (...args) => event.execute(...args, client))
} else {
client.on(event.name, (...args) => event.execute(...args, client))
}
await Table.addRow(event.name, "✅ SUCCESSFUL")
})
console.log(Table.toString())
}
idk what it means tho
have you uh considered using sapphire instead of making your own command/event handler? just a thought
you're literally in the Sapphire server buddy
i am?