Attempting to execute one function after another in my discord.js code. Here is what I have:
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())
{
//perform actions...
}
callback();
}
async function function2(){
//perform actions
}
Encountering an issue with the callback function not functioning properly. Any suggestions?