I tried using $(alias)
to run a specific command that is chosen in an array via some conditions using $(eval)
. However, I noticed that the $(alias)
variable hasn’t existed since the migration to the new alias system after a brief search.
Is there another way to run a command through another command (or a timer in my case), without having to enter the command name in the alias field?
For context, here’s an example of what I’m trying to do:
let a = ['!discord', '!socials', '!sponsor', '!youtube'];
let m = Math.floor((new Date()).getMinutes() / 15);
`$(alias ${a[m]})`;
I’m aware I can directly put the messages in the array. I’m doing it this way because I want to follow the DRY principle, as the messages already exist in commands.