Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 138163

Is there a way to check when someone's role was added? [Discord.js]

$
0
0

I'm trying to get the date when someone got a role, but I'm not sure how to do it and if there is really any way. I've been searching for this a really long time. I would love some help.

const Discord = require('discord.js');
let Bot = new Discord.Client();

async function GetDate(userid) {
  if (!userid) return message.reply('')
}

Bot.on("message", async(message) => {
    let messageArray = message.content.split("");
    let cmd = messageArray[0];
    let args = messageArray.slice(1);
    if(cmd === `!GetDate`) {
      let User = args[0]
      message.reply(`${User} is a member since 2020-02-17`)
    }
});

I


Viewing all articles
Browse latest Browse all 138163

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>