im trying to make a command to allow me to make more commands so far i have manege to make it add

on *:text: !trigger *:#: msg #stobbsie action

when i run the command with
!addcommand !trigger action
but i what it to say

on *:text:!trigger*:#: { msg $chan action }

but apparently { , } and $chan are reserved and cant be used any suggestions on how to fix this also how can i remove the space before and after !trigger this is the code im using


on *:text:!addcommand *:#: {
if ($2 == show) { msg $chan Commands avalible are !addcommand | return }
else {
write scripts\ilordcommands.txt on *:text: $2 *:$chan: { msg $chan $3- }
msg $chan done
}
}
}