Home

Published

- 1 min read

discord bot javascript remove user data in array

img of discord bot javascript remove user data in array

The solution for this is noted below

discord bot javascript remove user data in array

Solution

   case 'remove' :
    var remove = function(removeID){
        var index = array.indexOf(removeID);
        if (index>-1) {
            array.splice(index, 1);
        }
    }
    remove(args[1]);
    break;
//this code removes a specific value the user entered in an array i.e. !remove (the value here)

Try other methods by searching on the site. That is if this doesn’t work