G
G
Guest Nirvalen2019-04-08 13:51:20
JavaScript
Guest Nirvalen, 2019-04-08 13:51:20

How to make the bot be able to find out the userid of the user and save it as a log. Discord.js?

I want to make a moderation system for the bot but:
I want the bot to record the user ID
so that it remembers this user
I only know how to create a uid variable
let uid = client.userid;

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
senior65, 2019-04-08
@senior65

Um, maybe just write the uid variable to localStorage?

let storage = window.localStorage;
let c_id = localStorage.getItem('c_id');
if(!storage.hasOwnProperty(c_id)){
//Если это новый клиент, то
storage.setItem('c_id', uid); //Записываем его в хранилище
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question