Change or translate messages

Change the messages

All the messages are saved in the messages.json file. Every message has a title, which is the title of the embed, and a message, which is the message of the embed. Some messages also have some other options, but they are easy to understand.

After you've changed the messages.json file, you'll need to restart your bot.

Placeholders

Every message makes use of placeholders. These are little pieces of text which get replaced with a value when the command gets executed by a user. The default placeholders which you can use for the title and message in messages.json are:

  • [USER] = The mention of the main user

  • [TAG] = The tag of the main user

  • [USERNAME] = The username of the main user

  • [ID] = The id of the main user

  • [CHANNEL] = The mention of the channel where the command is sent in

  • [CHANNEL NAME] = The name of the channel where the command is sent in

  • [CHANNEL ID] = The id of the channel where the command is sent in

  • [CLIENT USER] = The mention of the bot

  • [CLIENT USERNAME] = The username of the bot

  • [CLIENT TAG] = The tag of the bot

The following placeholders are not always provided, they only get provided when there are two users involved in the command (eg. kick command, the executor and the user who should be kicked):

  • [USER 2] = The mention of the second user

  • [TAG 2] = The tag of the second user

  • [USERNAME 2] = The username of the second user

  • [ID 2] = The id of the second user

Custom placeholders

Some commands make use of custom placeholders. You can recognize them by the ^ sign which is directly after the [ sign in the messages.json. These custom placeholders are provided by only that command and only in certain circumstances and cannot be used for any other command or message. You can remove them or replace the position of the custom placeholders, but you cannot change their name or add a new one. By default, all the custom placeholders are provided in the messages.json. The definition of the custom placeholders are easy to understand by their name.

Economy messages

You can also edit the economy messages. They are saved in the file /commands/economy/data/messages.json. Also these messages make use of placeholders. The placeholders are:

  • [MONEY] = The money that the member wins or loses

  • [USER] = The member who uses the commands

All the messages in the /commands/economy/data/messages.json require the following properties in their object:

  • message: The message to sent

  • positive: Whether the user wins or loses money (true or false)

  • min: What the user wins/loses at least

  • max: What the user can max win or lose

Last updated