#GitHub issue 886
1 messages · Page 1 of 1 (latest)
Helper please have a look, thanks.
Changed the category to Together Java Bot.
<@&987246924425994290> please have a look, thanks.
I can just mention the /tag command in the answer like this.
but how do I use that in the syntax <tag: 1151517199920537669> ?
There is a method called mentionGlobalSlashCommand in MessageUtils
show me your code
how are you using the method?
it got another parameter
you can use
public static RestAction<String> mentionGuildSlashCommand(
Guild guild, String commandName, String... subCommands) {
but I am not sure if subCommands is for parameters
let me check the code
I think it isnt
try it out ig
mentionGuildSlashCommand(..., "tag", "id: ++")
worth a try
or just:
mentionGuildSlashCommand(..., "tag", "++")
it doesnt work :/
So what should I do ?
Should I at least keep there the /tag at the top and make a pull request ?
wait for Zabu 
fine, how do I summon him xd ?
will he look at this chat, or should I write him a dm ?
ok
waddup
for starters, its mentionGuildSlashCommand(guild, "tags", "xy")
however, if u call that on each of them, it will take forever
cause each time u call that method, it sends around rest requests to the discord api to fetch all commands and whatever
even though the command id is always the same
so a single fetch of the command id would be enough
ull have to create a new helper method
extracting the part out of mentionGuildSlashCommand that fetches the command id
and in another helper method, extracting the part that puts the id and the subcommands together into the magic string
then u can use those helpers instead
and later also refactor mentionGuildSlashCommand to use them instead
but step by step
start with mentionGuildSlashCommand(guild, "tag", "xy")
what does the magic string looks like for this example?
iirc </tag xy:911187149125206033>
but dunno
easiest is to just put a breakpoint into the code and see urself what it does
but it also doesnt really matter, the code exists already
just move it around
like, the existing mention method looks like this:
- fetch id
- build string
OP needs both isolated
to reuse the id and build the string without fetching the id again
so we put both functionalities into 2 separate helpers
refactor the mention method to use that instead
and then OP can use the 2 helpers individually
Fine, but this isnt working
what does "not working" mean? hojw does ur code look like? and again, ur not supposed to hardcode this
The syntax itself
the xy stands for the id of the tag, right ?
ur likely just doing sth incorrect
but shouldnt it work if we write it in discord as well?
</tag ++:911187149125206033>
somehow no
I am testing it on a discord server
share code and screenshot of ur discord thing
</tag:911187149125206030>
there u go
but still there is no id specifying the actual tag
if I write </"command_name" "id_of_tag":"command_id"> it doesnt work
if the bot does it or if u do it?
the result then looks like this
does it matter?
please share ur code
i have the feeling ur hardcoding it
instead of using the method
its about using it here with our account
.
I am saying, I am just trying it now in discord. Not coding anything
why doesnt it work if we use it?
ever thought about discord removing the perms for users but keeping it for bots?
please try it with the bot
with the existing mention method
fine
what about this then?
im trying to debug this
the existing method in the bot works (or at least worked when it was written)
so we start with that as starting point
cause we know that it works
it works without the id argument
.
I haven't code anything since the code I have already shared
this one, thank you
aha. now things connect for me
oh wait
ur trying to fill an argument/parameter
not a subcommand
im not sure that ever worked
yeah thats the question
subcommands have entirely different IDs
this one for example /help-thread close
thats a subcommand, not a parameter
exactly
well, then ask the issue creator if there is a way to get it working. otherwise the issue is dead
its me
xd
and idk
then rip that feature
I have not found anywhere on internet that it should be possible
ok big rip
So is there anything else I could do xd ?
close the issue and mark it that its not possible as of now lmao
can I do it ?
or write discord an email to ask about this lmao
uh dont know
but I am going in a sec
see ya and thanks for your attempt 
byee
Closed the thread.
