-
Notifications
You must be signed in to change notification settings - Fork 46
MiScript
Info: MiScript is in closed beta for patrons only. if you are not a patron, please consider donating @ https://patreon.com/mikibot
Mi(ki)Script is Miki's custom command language, specifically written to make it easy to use custom commands. In this document we will show you a starter guide on how to get started with MiScript.
say "hello world"
As you might realize, this command simply makes Miki say "hello world". There's nothing else happening.
I understand that sometimes you would like some additional information in your discord chats. So the ability to add text from variables provided by Miki is there.
say "Hello $[author]"
This would for example return
Hello Veld
Different responses are also allowed. You can for example add conditional branches. This is shown below.
if $author = "Veld" then
say "Hello Veld!"
else
say "Wait, you're not Veld!"
end
Since there is a message limit on Discord, I figured that using if
and else
over and over again is not a good idea for bigger commands. so I've added stop
that will stop the script and return the current output.
say "This message will be shown!"
stop
say "However, this message will be ignored!"
So now that you have a script going for yourself. Lets check how to add it in your server!
WARNING: this only works if you have the
MANAGE ROLES
permissions on a Discord server.
>createcommand "testcommand" say "$[author]! Long time no see!"
And if everything goes well, you will see this:
Documentation is not final.