Nautilus VAPP Wiki

Basics

What is VAPP?

VAPP, or Valour APPlication, is our way of making free bots for Valour. .vapp is the custom file used by the VAPP interpreter, which then gets sent to the Valour servers. .vapp files are made in the Nautilus IDE, what you're in right now.

What is Valour?

Valour is an open-source, modern chat client which focuses on privacy and security while implementing features that bring it beyond the norm. Valour's messaging system is designed to keep you in control of your messages. When you send a message, it is cached for 24 hours on the Valour backend before being permanently deleted.

Programming Basics

Programming languages

What is a programming language

Programming languages simply a way to tell computers what to do.

Are they hard?

A lot of them, not too much. And VAPP was created specially for being very easy.

What is a shell? Is there an animal too?

No, there are no animals. Shell is a name of the language interface.

Wat is an IDE?

IDE stands for Integrated Development Environment, simply a place to code.

So, here's an explanation of every block in Nautilus, and how they work.

Logic:

If: Simply a test. If something passes the test, it executes the do function, if it fails the test, it continues on. Can accept anything. Most common usage is if var = test, with an equal block.

=/!=/</>: Part of a test. External input to other block. Accepts 2 more inline inputs. Most common with an if block, to help pass a test.

and/or: Another test. External input to another block, accepts 2 more inline inputs. Most common with a if block and 2 equal blocks, to make sure multiple things are right before proceeding.

not: Inverts the input. Inputting true will output false, and vise versa.

True/false: Tests if something is, well, true or false.

null: Mostly a worst case error checker.

test: Checks the input, and does things if the value is true or false. External input.

try doing: Try/Catch block. Does something, and in case of error, you can make it do something with that error! Yay!

error text: throw the error.

Loops:

Repeat: Does whatever is inside it x times. Can be a number, or externally set with a variable. After it is done repeating, it continues.

while: Deadly. Don't use this unless you know what you are doing.

Count with i: Fancy repeat.

for each item in list: Well, you input a list, and every time it finds the item in it, it does the thing.

break out: Exists loop.

Math:

123: A number.

Operator: Does the basic arithmetic function.

squared root: AKA a sqrt, this is a complex block that allows for much more complex math function to execute.

sin: the sine of the input.

pi: Again, more complex math can be done with this. End block in a chain of math.

is even: Fun little block that can be used for many things like division!

round: Rounds it down or up, depending on type.

Sum: returns the sum of all numbers in the list

remainder: division!

constrain: Make sure the number stays in the range.

random: Random numbers!

atan2: Arctangent point of x,y is returned in degrees.

Text

String: looks empty, can hold text!

create text with: Makes a text block with the following elements. Can be extended.

to item append text: If you want to add something to the end of a variable. Only works if the var has text only.

length: Returns the size of the string.

empty: True if the string is empty.

in text find occurrence of text: Returns the position in a text of which the specification is found.

get letter: Well it finds the letter number.

get substring: Returns a chunk o' text

to UPPERCASE: makes the text uppercase

trim spaces: Gets side of whitespace. Useful for commands.

Lists

create empty list: Creates a list with nothing in it.

create list with: Creates the list with the following elements

Create list with repeated: Creates a list with the item, but a lot.

length of: Finds how many things are in the list

is empty: Returns if it is empty or not.

--is same as text--

Color:

color: Outputs that color value.

random color: Outputs a random color value.

color with: Makes a specific color.

blend color: Makes a color with 2 others.

Timer

start timer: Starts the timer. Accepts variable input. I don't recommend printing the timer to console before ending the timer.

end timer: Ends timer and stores value inside of variable. MAKE SURE YOU HAVE THE SAME VAR FOR BOTH START AND END.

wait: Waits in milliseconds

do until: Does something until something happens.

Functions

to: Create a function with no output. Can be called later.

to: Create a function with an output. can be called later.

if return: If something is true, return a value.

Valour

token: Debug block, will be removed later.

message received: Executes whenever a user sends a message in any of the planets the bot is in.

Message content: Send the message. Usually the end of a chain of blocks for a command.

role add/remove: Modify the users' roles.

Kick/ban: Kick and ban members, and attach a reason.

Value to get: Get a value from somewhere, such as the ID of a message.

Message part: 2 part block, used to get part of a message.

Author/channel/planet: All parts of a message that can be extracted.

ID: Get the id of a message.

Debugging

Print to console: Print to the mini console

Clear: Clear the mini console.

print: Print, in the form of a pop up. Does not work in valour.

make as a: Force something to become a number/string.

input: Get the most recent input from the mini console.