#(JustinS) Same command in multiple scripts?
23 messages · Page 1 of 1 (latest)
(JustinS) Same command in multiple scripts?
Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
Do you just want sub-command handling to be split up?
Or am I misunderstanding
yeah
so the other dsc file has /flag, /flag display, /flag list, etc. And I want my new dsc file to use /flag sc ...
Well, can just - run/- inject task scripts from within your command script then - different command scripts will override each other
I dont want them to be dependent of each other though
or that 1 is dependent of the other
They don't need to depend on each other, can just
- choose <context.args.first>
- case display:
- run flag_display_command
- case list:
- run flag_list_command
...
In your command script
Or can even go extra fancy and do a dynamic thing, where it checks for a script called flag_<first arg>_command and runs it if it exists
So that you can create more scripts and it'll automatically work
Im confused
or are you confused
I have 2 seperate .dsc files
Ill just use a differen command
You can't have a command script container twice, because they'll both be creating the same command
yeah that makes sense
If you want /command x and /command y with x and y's handling in different scripts, you can put them in task scripts and call these task scripts from the command script