I am trying to call the one function after the other. I am working with discord.js and this is my code:
function1(function2)
async function function1(callback) {
var guild = client.guilds.cache.get(config.Server);
let channels = guild.channels;
for (const channel of channels.cache.values())
{
//stuff...
}
callback();
}
async function function2(){
//stuff
}
My problem here is that the callback isn't working... Any help?