-
Notifications
You must be signed in to change notification settings - Fork 164
Using the admin panel
Once you have installed and turned on your bot, a website should be running locally. Go to http://localhost:8000 to see it live! This is what you should see:
Go to http://localhost:8000/admin/init to create your first user, then login using the same credentials.
You will be disconnected after some time for security reasons. When this happens, you'll be seeing 401 errors. To fix it, click the empty profile picture at the top right corner, then click logout.
To create your first countryballs, go to the "Ball" tab, then click the "Create" button. You'll be greeted with this:
Let's go fill the values
-
Country
is the name of your countryball -
Short name
can be used when the base name is too long for displaying in the card, providing a shorter alternative -
Catch names
is for providing alternative catch names for your countryball, may it be for translation or other purposes. You can input your different names separated by semicolons (;
). Don't put spaces between semicolonsYour catch names will all be lowercased after saving, this is normal.
-
Regime
defines the image background -
Economy
defines the logo at the top right corner -
Health
is the base health stat. This stat will vary from -20% to +20% when caught, defined randomly -
Attack
is the base attack stat. This stat will vary from -20% to +20% when caught, defined randomly -
Rarity
defines how rare is this countryball in the spawn algorithm. A value closer to 0 means more rare. A rarity equal to 0 means it cannot spawn.While not required, it's a good practice to only set rarities between 0 and 1, 1 being the most common and 0 the most rare.
-
Enabled
is a toggle for enabling or disabling this countryball to the public. Disabled countryballs do not appear in/balls completion
and cannot spawn, but they can be spawned or given manually with/admin
. -
Emoji ID
is for the custom emoji placed next to the ball when displayed. Obtaining an emoji ID is tricky:-
Type an emoji in the chat bar
-
Add an antislash
\
character before your emoji. The image should disappear and show the text name of the emoji instead. -
Send the message. The ID is a number between 17 and 19 characters as highlighted.
-
Copy and paste that number in the form
-
-
Wild card
is the image used when a countryball spawns in the wild -
Collection card
is the image used inside the cards (/balls list
or/balls info
) -
Image credits
is a little sentence added for crediting the author of the artwords in the corner of the card -
Capacity name
is the title in the middle of the card -
Capacity description
is the smaller text beneath the title
Now click save
, you just added your first countryball!
When editing the balls from the admin panel, the owner of the bot must type b.reloadcache
to apply the effects onto the bot!
You can preview its card by going in the list of balls, then clicking Actions > Generate card
You should be using the /admin blacklist
command to add or remove blacklists.
You can also use the admin panel to add, remove, and view blacklist. This is, as of writing this, the only way to view blacklist reasons.
When editing the blacklist from the admin panel, the owner of the bot must type b.reloadcache
to apply the effects onto the bot!
There is a way to add ephemeral backgrounds to the cards. Think about spooky countryballs or boss events on Ballsdex.
- Go to the special events tab
- Click to create an event
- Choose a name
- Choose a catch phrase, aka a phrase added when someone caught a countryball with that event applied
- Choose the starting and ending dates of the event
- Define how rare it will be to get this special background. 0 means no one will get it, and 1 completely overrides the vanilla theme. 0.5 will be 50/50 between vanilla and your custom background.
- Add your custom background for each regime. If you're lazy, just use the same one for all fields.
-
Run
b.reloadcache
to make the bot refresh its internal list! This should be done each time you edit events.
We also have boss backgrounds, and a special reichtangle background for Ballsdex. These are just special events tricked so that they never happen.
- Create an event like described above
- Set a rarity of 0
- Optional but why not: Define absurd dates that will never be reached, like Jan 1st 1970. This can actually increase performance.
- Give the countryball using
/admin give
If you're hosting this on your personal computer : don't.
Opening your local traffic to the internet is incredibly risky, opening you to all kinds of security breaches. Not just you, but your entire family. If you don't have a domain name, you'll also be forced to openly share your IP address. And if you don't configure secure networking, that's opening your PC to even more potential viruses and security breaches.
You get me, just don't do it unless you're hosting Ballsdex on a server, or you really know what you're doing.
I will not be providing instructions, as I consider this way too risky for the average user. Once the admin panel is running on port 8000, the rest is out of scope of the bot, and you should be able to learn about networking and see how to share that outside.
If you somehow got that running securely, then go to the admin tab to add your friends with their own login.
Support my work on Patreon and get exclusive rewards!
For $10/month, I will be hosting your custom bot on my server, with immediate updates, secure and shared admin panel, and stats on https://grafana.laggron.red !