- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1
Installing third party packages
Third party packages are packages that are not officially in Ballsdex and instead created by the community. Most common examples of third party packages are boss or battle. We will learn how to add them to our bot in this tutorial.
Important
As third party packages are not official and are made by the community, any errors relating to a package either leads to outdated code or editing something incorrectly. Do not go to the #help or #coding channel in the Ballsdex Developers server if you have an error with a package. Go to the #3rd-party-support channel and put your issue there instead.
Important
There might be extra steps you will need to do for some packages before it could work properly. This could range from changing lines in the code to adding new things in the code. Read the page of the package you are downloading to look for any extra steps you may have missed. If a package has different instructions (like adding migrations) then do steps 1-6 from this tutorial and then follow the instructions the package gives you.
- 
Find a package you want. I will be using this battle package as an example. 
- 
Copy the URL of the package repo. 

Tip
If you want only one package from the repo, click on the package folder and then copy the URL. It should look like this:

- 
Go to the Download Directory site, a tool used for downloading GitHub directories. 
- 
Paste the link you just copied into the site, it should look like this: 

- 
Press ENTER, a download prompt will appear. Save the file where it is most convenient for you. 
- 
Unzip the file you got from the Download Directory, but do not touch it yet! 
- 
Open your bot folder, then go to ballsdex/packages. There should be multiple folders inside the directory.

- Drag the package folder inside the unzipped file into the packagesfolder.


Tip
Packages will usually contain cog.py and __init__.py. If the package contains any other files (xe_battle_lib.py as an example), you can download them too unless told by the creator of the package what files are not needed to run the package. For example, you will not need README.md when downloading any package.
- Open your config.ymland scroll down to where it sayspackages.

- Add ballsdex.packages.packagenamehere. Replace "packagenamehere" with the name of the package folder you added. For example, if my folder was namedbattle, I would putballsdex.packages.battle.

It should look like this after adding the package:
# list of packages that will be loaded
packages:
  - ballsdex.packages.admin
  - ballsdex.packages.balls
  - ballsdex.packages.config
  - ballsdex.packages.countryballs
  - ballsdex.packages.info
  - ballsdex.packages.players
  - ballsdex.packages.trade
  - ballsdex.packages.packagenamehere- Save your changes, then restart your bot using docker compose restart.
When the bot goes back up, new commands from the package you added should appear. If they don't, refresh your Discord by pressing CTRL + R on your keyboard (If you're on mobile, close the Discord app then open it again).
Do steps 1 to 8 above, then follow this below:
- 
Go to your corefolder, then open thebot.pyin your text editor.
- 
Go to line 49, or look for this below: 
PACKAGES = ["config", "players", "countryballs", "info", "admin", "trade", "balls"]- Add the name of the package folder you made into the list of packages. It should look like this (using the battle package as an example):
PACKAGES = ["config", "players", "countryballs", "info", "admin", "trade", "balls", "battle"]- Save your changes, then restart your bot using docker compose restart.
As packages get updated every now and then, I cannot put them directly in this repo. What I can do though is provide links for them and let you see them on your own. These packages are listed in alphabetical order and can be accessed by clicking the name of the package highlighted in blue.
If you would like to add your package here, ping me in the Ballsdex Developers Server (ihailthenight1234).
Note
The battle package will be replaced with "CBattle" when it releases. CBattle is a battle package that is highly customizable, made by two very well known creators in the community, and looks very promising.
- 
Art: Allows you to accept or decline artwork suggestions through the bot. 
- 
Achievement: Allows you to make achievements for players to claim. You will have to give the reward yourself, the package does not do it for you. Please read the instructions on how to get this package working correctly. 
- 
Battle: A basic battle package. Does not come with abilities coded. 
- 
Betting: A basic betting/gambling package. 
- 
Broadcast: Allows you to make a broadcast across all servers. 
- 
Crafting: Allows you to craft 2 or more balls into a new ball. Crafting specials is supported in this package. Please read the instructions on how to get this package working correctly. 
- 
Merge: Allows you to merge two balls together, which combines ATK and HP together along with the card art (card art gets split in half). 
- 
Report: Allows users to report other users through the bot. 
- 
Rewards: Allows admins to distribute rewards through the bot. Very useful for things like giveaways and lost items. 
- 
Racing: A custom battle package which simulates a race instead of a fight to the death. 
If you have any errors, join the Ballsdex Developers server by clicking this blue text.