Exiled-Team / DiscordIntegration

GNU General Public License v3.0
13 stars 37 forks source link

[BUG] Permission ".*" not working properly #106

Closed miniSpoXster777 closed 2 years ago

miniSpoXster777 commented 2 years ago

Describe the bug To be able to use commands by the bot, they must be added separately in the DiscordIntegration-config.json configuration. Otherwise, granting the permission ".*" to role does not work because the bot returns "That command is not enabled on this server."

To Reproduce Steps to reproduce the behavior:

  1. Go to 'DiscordIntegration-config.json'
  2. Change role permission to ".*"
  3. Restart bot
  4. Try command example "/send 1 ban" > bot will return Code 6
  5. Back to 'DiscordIntegration-config.json'
  6. Replace ".*" with "ban"
  7. Restart bot
  8. Try command againg "/send 1 ban" > bot will return this: https://cdn.discordapp.com/attachments/987254233638252574/987632885672607774/unknown.png

Expected behavior Bot should not return code 6 but https://cdn.discordapp.com/attachments/987254233638252574/987632885672607774/unknown.png

Server logs none

EXILED Version ("latest" is not a version): 5.2.1

Results of show plugins command in console: https://pastebin.com/nufFpcDB

Additional context none

miniSpoXster777 commented 2 years ago

Hi! I wanna add that command unban not works either giving command to role unban, unban id or unban ip Giving same error as above with .* image image image

Try not to use spaces in command names. Instead of "di playerslist", "di stafflist", "di reload" try to use only "di" and also with unban try use ony "unban" not "unban id" and "unban ip". It should be working

joker-119 commented 2 years ago

Spaces or not, should work fine. It seems I forgot to add handling the .* permission string properly, will fix in an update soon.