Leave Image API
Last updated
Last updated
In this article I'll show you how to just go to a website and make a member leave image. I'll try to explain this more in a friendly way then a techy way so even if you don't know anything about APIs you are able to do it!
So, let's see how a basic leave image will look like :
If you are just here to get the API url for
Iko's
leave system and don't want to understand how all of this works, then just pass the following URL in image parameter :
https://api.itzleo.xyz/leave?u=%user_name%&a=%user_avatar%&bg=abc.png&tc=4287f5&c=Cya-Soon
Replace
abc.png
with background image you wantReplace
Cya-Soon
with text you want to display
Incase you have space between words, replace them space with
-
. For example if you want it to beBye bye
you have to passBye-bye
Replace
4287f5
with hex color (without#
) for text
So, let's get started!
In simple words base URL is the website which you will use to create such images and that is :
Parameters are simple words you add to Base URL to customize the embed.
So, let me list the parameters first and then I'll explain you how to use them.
u
: username of the user who left
Incase you have space in username replace it with
-
(dash).
#
(between user name and user discriminator) should be replaced with_
underscore.
a
: URL of user avatar
bg
: URL of background image
tc
: color of text - hex color without #
c
: text to display instead of Cya Soon
Now, let me show you how to customize the embed.
So, let's say the username is hello#1234
. First, we need to replace #
to _
. So, the username will look like hello_1234
. Now, the parameter for username is u
and the base URL is https://api.itzleo.com/leave
.
Now, to mention the parameter we use ?
followed by the parameter name and then a =
(equal) which is followed by parameter value.
So, our URL will now look like :
https://api.itzleo.xyz/leave?u=hello_1234
The image you will get will look like this :
Now, what if you have space between the username? Well replace that space with -
(dash), so hello world#1234
will look like hello-world_1234
and the URL will be
https://api.itzleo.xyz/leave?u=hello-world_1234
Now, to mention more parameters we won't use ?
we will just use &
and then type parameter name followed by =
which is further followed by parameter value.
Now, the parameter for avatar is a
. The test image we will be using is https://i.imgur.com/ATRp8VT.png
So, now the URL will be :
https://api.itzleo.xyz/leave?u=hello_1234&a=https://i.imgur.com/ATRp8VT.png
We simply added &a=https://i.imgur.com/ATRp8VT.png
The image you will get will look like this :
Now, I guess you are already pro with URLs and parameters by now. The parameter name for background URL is bg
and the test background URL will be https://i.imgur.com/PA9pnIe.png
So, we will just add &bg=https://i.imgur.com/PA9pnIe.png
to our previous URL and now it becomes :
https://api.itzleo.xyz/leave?u=hello_1234&a=https://i.imgur.com/ATRp8VT.png&bg=https://i.imgur.com/PA9pnIe.png
The image you will get will look like this :
The parameter name for text color is tc
and you need to pass hex color without #
. If you are wondering where you can get hex color just checkout here.
We will be using #4287f5
for testing. So, first we will remove #
and then we will add &tc=4287f5
to our URL.
The URL now becomes :
https://api.itzleo.xyz/leave?u=hello_1234&a=https://i.imgur.com/ATRp8VT.png&bg=https://i.imgur.com/PA9pnIe.png&tc=4287f5
The image you will get will look like this :
You can customize Cya Soon
text in the image too. The parameter you have to use is c
followed by =
and the text you want. Incase, of space replace the space with -
.
Let's try to replace it with Bye bye
. So, let's replace the space with -
: Bye-bye
. Now, we need to add &c=Bye-bye
to the URL.
The URL now becomes :
https://api.itzleo.xyz/leave?u=hello_1234&a=https://i.imgur.com/ATRp8VT.png&bg=https://i.imgur.com/PA9pnIe.png&tc=4287f5&c=Bye-bye
The image you will get will look like this :
You can now create your own custom images using this API. If any developer wants to use this API in his/her/their bot, you are free to do so!