Chew / JDA-Chewtils

Chew's fork of JDA-Applications/JDA-Utilities, with support for modern features such as Slash Commands, Context Menus, and more.
https://chew.pro/JDA-Chewtils
Apache License 2.0
73 stars 24 forks source link

Default @mention prefix no longer respected #39

Closed brandonfl closed 2 years ago

brandonfl commented 2 years ago

Issue Checklist

Affected Modules

Command

Description

When I try to use the mention prefix, it dont work at all with Chewtils. I've tryed doing the same on JDA-Utilities and it work

image

Chew commented 2 years ago

What are you setting your prefix to?

https://github.com/Chewbotcca/Discord/blob/main/src/main/java/pw/chew/chewbotcca/Chewbotcca.java#L90

I'm able to get it to work with <@!clientid>

image

brandonfl commented 2 years ago

@Chew The prefix that i've tryed are :

In the 2 cases, it dont work. With JDA-Utilities, if you dont set any prefix or if you set to @mention, the prefix is automatically changed with the client id of the bot.

Here is the code related to this feature into JDA-Utilities :

JDA-Applications CommandClientImpl.java line 67 :

 line 67

JDA-Applications CommandClientImpl.java lines 498 to 506 :

lines 498 to 506

There is no reason to have to manually set the prefix with the client id. In my case, I provide bots on-premise, I dont want that people have to set prefix with client-id. The default prefix should do the job

brandonfl commented 2 years ago

Another point of the @mention feature is for the help builder. It should translate the @mention by the @Bot name for exemple :

D0jE6NqW6m

In your situation, it show :

DiscordCanary_AC5b4X0jdY

That's not user friendly, like, a developper can understand it if he know how the discord api work, but not a user