Skip to content

Use slash-command mentions #559

@Zabuzard

Description

@Zabuzard

Mentions

Discord recently released a new feature called slash command mentions.

mention

The syntax for this is simple, its pure text in a specific format like </ask:987249686383591447> where the number is the ID of the command. The ID can be get in developer mode by right clicking the command when about to use it:

copy_id

Proposal

The bot should make use of this when writing messages that contain such mentions, for example when explaining the help system:

example1

example2

and possibly more. Its likely easy to identify with a text search of / in the code base.

Details

Utility

When implementing, we should add utility to not have to write this syntax all the time. Similar to how we can do author.getAsMention(), we should have some sort of DiscordUtils.mentionSlashCommand("ask", 987249686383591447).

We already have such an utility class somewhere, which can be reused for this.

IDs

A bit annoying, but we can not just hardcode those IDs. They likely have to be part of the Config.java/config.json file. They might be different for each command/guild/...

However, we should have a quick check whether we can retrieve the ID of a command via JDA. Then we could possibly make this dynamic and add it to our slash commands in-code.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions