Skip to content
Advertisement

How do I get the most recent call of a command, and save it in a function? [closed]

I’ve been messing with bots for a couple days now, and I’m trying to get the name of the user that called a certain command, then be able to use that later on in a different command. I’ve tried using context.author, as in the example below, but it doesn’t seem to work.

JavaScript

Advertisement

Answer

You can just use a global variable.

JavaScript
Advertisement