-
Notifications
You must be signed in to change notification settings - Fork 28
Using Vixio Syntax
You will notice that in each syntax, as of Vixio 2.0.x, Vixio no longer allows you to just input an id for each syntax. This was because that was un-reliable and non-performant. As of Vixio 2.0 you are required to provide actual types for each syntax.
For example, when using the Send Message
syntax, many people see the syntax send %message/string/messagebuilder/embedbuilder% to %channels/users% with %bot/string% [and store (it|the message) in %-objects%]
and think they can just do send "Hi" to 1231 with event-bot
. However, that is not the way it is done. When you want to send a message to a %channel%
for example, you must use an expression that returns a %channel%. One syntax that returns a channel based on ID for example, is channel with id %string%
. This returns the %channel% type Vixio needs to be able to send a message to it.
So now that we have an expression that returns a channel, and the send effect that needs a channel to send to. All we do is combine them like so;
discord command send <text>:
trigger:
send arg-1 to channel with id "51561651" with event-bot
When broken down, we see our channel with id "21312"
expression inside of our send effect. If this confuses you here is a little more broken down example;
discord command send <text>:
trigger:
set {_channel} to channel with id "51561651"
send arg-1 to {_channel} with event-bot
This sets a variable to the channel
that the channel with id
expression returns and gives that channel to the send effect to send it to.
You can think about is like so; If I asked you to send a message to 543432423, could you? No, you need a specific channel to send it to. That is how Vixio 2.0.x works, it will not guess for you because that's unreliable.
So this is how syntax all across Vixio work, say you wanted to get the name of a channel by it's id. You'd use the discord name of
expression and combine it with that channel that channel with id
returns like so; broadcast discord name of channel with id "34343"
which would broadcast the name of the returned channel.
Vixio, the Skript addon made to fit all of your Discord needs.