turn a reply into a small program.
replies can run code, so one command can be a whole feature like coins, a shop or a game. code goes in curly brackets, and | splits the parts: {random: yes | no | maybe}. what people type is never run as code, it's only ever text. put a backslash before a bracket or | to show it as plain text.
about the person: {user} {user.id} {user.name} {user.display} {user.avatar} {user.created} {user.joined} {user.roles} {user.toprole}. who they mention or reply to, or themselves: {target} {target.id} {target.name} {target.display} {target.avatar} {target.created} {target.joined}.
the server: {server} {server.id} {server.icon} {server.owner} {server.boosts} {server.created} {count} {channel} {channel.id} {channel.name} {channel.topic}. what they typed: {args} for all of it, {args.1} {args.2} for single words, {args.count} for how many words. {uses} is how many times the command ran.
logic: {if: {args.1} == hi | yes | no} picks one, comparing with == != > < >= <= contains or startswith. {and: a | b} {or: a | b} {not: a} combine checks. {stop: message} ends the command there. {require: role | message} stops anyone without that role, {hasrole: role} gives 1 or 0.
numbers and text: {random: a | b} {number: 1 | 100} {math: (2 + 3) * 4} {repeat: 3 | text} with {i} as the count, {lower: x} {upper: x} {trim: x} {length: x} {replace: text | old | new} {cut: text | 1 | 5} {word: text | 2}. {set: name | value} and {get: name} remember something while the command runs.
saved data, kept between runs: {save: key | value} {load: key | default} {add: key | 5} are shared by the server. {mysave} {myload} {myadd} belong to the person running it, {theirsave} {theirload} {theiradd} to the target. {top: key | 10} shows a leaderboard of a saved number. {now} is the time in seconds and {stamp: seconds} shows it as a discord time.
actions: {addrole: name} {removerole: name}, add | target to use them on the target, {dm: text} dms the person running it, {send: #channel | text} posts somewhere they're allowed to post, {react: emoji}, {delete} removes their message. {title: x} {color: #ffffff} {image: link} change the card. a run can do up to 10 actions.
customcommand