Skip to content
This repository was archived by the owner on Jan 2, 2019. It is now read-only.
This repository was archived by the owner on Jan 2, 2019. It is now read-only.

Trying to obtain a user id by var and it says user not found #101

@BleachPoptart

Description

@BleachPoptart

var dateFormat = require('dateformat');
var now = new Date();
var variable = message.content.replace(';exile', '');
var ID = rbx.getIdFromUsername(variable);
if(message.member.roles.some(r=>["Specialized Control Unit", "Combat Medic Leader", "Officer", "Lieutenant", "Captain", "Assistant Director", "Director", "Overseer", "The Administrator"].includes(r.name)) ) {
console.log('Waiting for login.')
rbx.login('username', 'my password');
console.log('Login verifed.')
console.log(message.author.username + ' Has logged into SCPF_SECURITYDEPT At ' + dateFormat(now, "dddd, mmmm dS, yyyy, h:MM:ss TT"))
setTimeout(function(){
rbx.exile(3506926,ID);
}, 10000);
console.log(message.author.username + ' Has exiled ' + variable, ' from the Security Department At ' + dateFormat(now, "dddd, mmmm dS, yyyy, h:MM:ss TT"))
message.channel.send(message.author + ' Has exiled' + variable,' from the Security Department At' + dateFormat(now, "dddd, mmmm dS, yyyy, h:MM:ss TT"))}
else{
message.channel.send("Exile failed, Do you have the correct role to use this function?")
console.log(message.author.username + ' Has attempted to exile' + variable + ' at' + dateFormat(now, "dddd, mmmm dS, yyyy, h:MM:ss TT"))}
break;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions