#channel shenanigans

1 messages · Page 1 of 1 (latest)

cloud tree
#

where do you call that function?

outer hamlet
cloud tree
#

you export a function here

#

you call it, somewhere

#

that code, show it

outer hamlet
#

@cloud tree this?: ```fs.readdir("./events/discord", (_err, files) => {
files.forEach(file => {
if (!file.endsWith(".js")) return;
const event = require(./events/discord/${file});
let eventName = file.split(".")[0];
console.log([Event] ✅ Sucessfully loaded: ${eventName});
client.on(eventName, event.bind(null, client));
delete require.cache[require.resolve(./events/discord/${file})];
});
});

cloud tree
#

presumably, yes

outer hamlet
#

what's the problem

cloud tree
#

log oldState and newState

outer hamlet
#

@cloud tree sorry for late so it send many lines in console

#

weird lines

cloud tree
#

first few of each log might already be useful

outer hamlet
#

here a block @cloud tree : voiceStateUpdate: [Function: bound ] AsyncFunction, raw: [ [Function (anonymous)], [Function (anonymous)] ] }, _eventsCount: 6, _maxListeners: undefined, options: { intents: 1152, waitGuildTimeout: 15000, shardCount: 1, makeCache: [Function (anonymous)], messageCacheLifetime: 0, messageSweepInterval: 0, invalidRequestWarningInterval: 0, partials: [], restWsBridgeTimeout: 5000, restRequestTimeout: 15000, restGlobalRateLimit: 0, retryLimit: 1, restTimeOffset: 500, restSweepInterval: 60, failIfNotExists: true, userAgentSuffix: [], presence: { status: 'online', user: [Object] }, sweepers: {}, ws: { large_threshold: 50, compress: false, properties: [Object], version: 9, presence: [Object] }, http: { agent: {}, version: 9, api: 'https://discord.com/api', cdn: 'https://cdn.discordapp.com', invite: 'https://discord.gg', template: 'https://discord.new', scheduledEvent: 'https://discord.com/events' },

outer hamlet
#

ok...

cloud tree
#

shibaThinking that's a function

#

log the states, inside the function