ZumitoTeam / zumito-bot

Discord Bot
GNU General Public License v3.0
4 stars 1 forks source link

Add new command Prefix #167

Open WilliamAcosta1 opened 2 months ago

WilliamAcosta1 commented 2 months ago

Prefix command

I have created the prefix command so that the bot has the ability to change the prefix at will.

Objectives:

Command idea with example images:

  1. In this first stage the user only needs to execute the command z-prefix to be able to visualize the current prefix that he has in the server.

Example:

image

As you can see in the image you can see that the bot responds with a message and showing the current prefix.

Translation code: ${this.emojiFallback.getEmoji('', 'ℹ️') } ${ trans('message', { prefix: ['h!'] })}

  1. Now let's see how the command behaves when executed with a prefix command: h!prefix z-

Example:

image

As we can see the prefix has been changed and the robot will now only respond to that prefix

Message code: ${this.emojiFallback.getEmoji('', '✅') } ${ trans('changed', { prefix: ['h-'] })}

  1. I have also added an error message if you do not have administrator permission to change it. Any user without administrator permission will not be able to use the command.

Example:

image

As you can see if you use the prefix the message will be visible to everyone if you use the forward slash only the user who executed that command will be able to see it.

Message code: ${this.emojiFallback.getEmoji('', '🚫') } ${ trans('permissions', { permissions: ['Administrator'] })}

  1. Also add an error message if the user tries to use the command in a private chat or direct message.

Example:

image

As you can see this is the message that is displayed when using the bot in direct messages.

Message code: ${this.emojiFallback.getEmoji('', '⚠️') } ${ trans('directMSG')}

This command is essential for the bot also it would be advisable a service to obtain the prefix in a more comfortable way and it would also be good to add the args of the slashcommand for better ease without more to add I remain attentive to any concern