#how do I automatically resolve any eval commands if it's a promise?

8 messages · Page 1 of 1 (latest)

radiant tendon

I've been trying to get member.search() to work, and i just can't get it to resolve or anything. If I ever have to do any promises, how would I get it to automatically resolve? Do I do if (evaled == Promise) Promise.resolve(evaled)?

grim pendantBOT
  • Consider reading #how-to-get-help to improve your question!
  • Explain what exactly your issue is.
  • Post the full error stack trace, not just the top part!
  • Show your code!
  • Issue solved? Press the button!
  • Marked as resolved by OP
sour plank

You await them… as in other places you use promises

radiant tendon
sour plank

That would resolve your promise, yes. But I stay with my suggestion to not make an eval command at all as long as you lack that basic JS knowledge. Because you also lack the knowledge to harden it against abuse in that case

radiant tendon

example: const unallowedevals = ["stuff that people other than me can't eval"]

I know how but that's not the topic