function changePresence(id) {
    /*
        You can only update the playing message 5 times a minute.
        If you exceed that limit, it will silently drop the request.
    */
    var index = statusMessages.findIndex(status => status.id === id)
    if (index !== -1) {
        const element = statusMessages[index];
        client.user.setActivity(element.text, element.presence);
    } else {
        console.warn("Was given an ID that doesn't exist!");
    }
}
// Changes the presence of the bot by IDs
Changes the presence of the bot by IDs
Changes the presence of the bot by IDs
function changePresence(id) {
    var index = statusMessages.findIndex(status => status.id === id)
    if (index !== -1) {
        const element = statusMessages[index];
        client.user.setActivity(element.text, element.presence);
    } else {
        console.warn("Was given an ID that doesn't exist!");
    }
}
function changePresence ( id ) { var index = statusMessages . findIndex ( status => status . id === id ) if ( index !== - 1 ) { const element = statusMessages [ index ] ; client . user . setActivity ( element . text , element . presence ) ; } else { console . warn ( "Was given an ID that doesn't exist!" ) ; } }
Changes the presence of the bot by IDs
Changes the presence of the bot by IDs
/*
        You can only update the playing message 5 times a minute.
        If you exceed that limit, it will silently drop the request.
    */