-
Notifications
You must be signed in to change notification settings - Fork 1
How to add emojis in catch messages
Important
Further testing by me shows that this will work only if you have the emojis in the server and not in the application itself. If you are able to migrate your emojis back to servers or you already have emojis in the server, ignore this message and follow the tutorial.
The tag {emoji} can now be added to your custom catch messages, making this tutorial no longer needed for 2.29.5 and above.
- Open your bot folder and go to
ballsdex/packages/countryballs. The directory should look like this:
- Open
countryball.pyin your text editor and scroll down to the end of the file.
You should see this:
- Make a new line below
collectible=settings.collectible_name,, and addemoji=self.bot.get_emoji(ball.countryball.id),
It should now look like this:
- Save your changes in the file.
You will now have a new variable to add in the catch messages called {emoji}, which you can use in your catch messages to add the emoji of the ball.
Example: You caught {emoji} **{ball}**!
- Once you are done editing the catch messages to include
{emoji}, save the config file and do the following text commands in separate messages:
b.reload countryballs
b.reloadconf
This will reload the countryballs package, then it will reload the config file to include the {emoji} variable you added. You do not need to do this every time you edit the config, but b.reloadconf is still a useful command if you want to add new things in the config without restarting the bot.
Warning
This has not been tested yet by me. If anyone would like to test this with the versions mentioned, feel free to do so and then ping me in the Ballsdex Developers server with the results (tag is ihailthenight1234)
- Open your bot folder and go to
ballsdex/packages/countryballs. The directory should look like this:
- Open
countryball.pyin your text editor and scroll down to the end of the file.
You should see this:
-
Make a new line below
text = "", and addemoji = interaction.client.get_emoji(self.ball.model.emoji_id) -
In the catch message itself (
f"You caught **{self.name}!** "), add{emoji}next to**{self.name}!**
It should look like this:
- Save your changes, then restart your bot using
docker compose restart.
When the bot goes back up, test the catch message by admin spawning a ball and catching it.
- Open your bot folder and go to
ballsdex/packages/countryballs. The directory should look like this:
- Open
components.pyin your text editor and go to line 88. It should look like this:
-
Make a new line below
await interaction.followup.send(, and addemoji = interaction.client.get_emoji(self.ball.model.emoji_id) -
In the catch message itself (
f"{interaction.user.mention} You caught **{self.ball.name}!** "), add{emoji}next to**{self.ball.name}!**
It should look like this:
- Save your changes, then restart your bot using
docker compose restart.
When the bot goes back up, test the catch message by admin spawning a ball and catching it.
If you have any errors, join the Ballsdex Developers server by clicking this blue text.