Class MentionPrefixProviderJavacord
- java.lang.Object
-
- net.kautler.command.api.prefix.javacord.MentionPrefixProviderJavacord
-
- All Implemented Interfaces:
PrefixProvider<Message>
public abstract class MentionPrefixProviderJavacord extends Object implements PrefixProvider<Message>
A base class for having a mention of the Javacord-based bot as command prefix. To use it, create a trivial subclass of this class and make it a discoverable CDI bean, for example by annotating it with@ApplicationScoped.
-
-
Constructor Summary
Constructors Constructor Description MentionPrefixProviderJavacord()Constructs a new mention prefix provider for Javacord.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetCommandPrefix(Message message)Returns the command prefix to be used for the given message.StringtoString()
-
-
-
Method Detail
-
getCommandPrefix
public String getCommandPrefix(Message message)
Description copied from interface:PrefixProviderReturns the command prefix to be used for the given message. Typically this does not depend on the message content itself, but on properties of the message, like the server the message was sent on, to have different prefixes on different servers.- Specified by:
getCommandPrefixin interfacePrefixProvider<Message>- Parameters:
message- the message for which the prefix has to be returned- Returns:
- the command prefix to use for the given message
-
-