Package io.manebot.command
Class CommandSender
- java.lang.Object
-
- io.manebot.chat.DefaultChatSender
-
- io.manebot.command.CommandSender
-
- All Implemented Interfaces:
ChatMessageReceiver
,ChatSender
- Direct Known Subclasses:
DefaultCommandSender
public abstract class CommandSender extends DefaultChatSender
-
-
Constructor Summary
Constructors Constructor Description CommandSender(PlatformUser user, Chat chat)
-
Method Summary
Modifier and Type Method Description Chat
getChat()
Gets the chat the message was sent in.abstract Conversation
getConversation()
Gets the conversation the message was sent in.java.lang.String
getDisplayName()
Gets the display name of the command sender.CommandSender
getParent()
Gets the parent to this command sender, such as for a sub-execution.abstract User
getUser()
Gets the user this sender represents.java.lang.String
getUsername()
Gets the username of the command sender.-
Methods inherited from class io.manebot.chat.DefaultChatSender
begin, canSendEmbeds, end, flush, getPlatformUser, sendDetails, sendFormattedMessage, sendList, sendMessage, sendMessages
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.manebot.chat.ChatMessageReceiver
sendFormattedMessages, sendMessages, sendRawMessage, sendRawMessages
-
Methods inherited from interface io.manebot.chat.ChatSender
sendList, sendMessage
-
-
-
-
Constructor Detail
-
CommandSender
public CommandSender(PlatformUser user, Chat chat)
-
-
Method Detail
-
getParent
public CommandSender getParent()
Gets the parent to this command sender, such as for a sub-execution.- Returns:
- CommandSender instance.
-
getConversation
public abstract Conversation getConversation()
Gets the conversation the message was sent in.
-
getUser
public abstract User getUser()
Gets the user this sender represents.- Returns:
- User.
-
getUsername
public java.lang.String getUsername()
Description copied from interface:ChatSender
Gets the username of the command sender.
-
getDisplayName
public java.lang.String getDisplayName()
Description copied from interface:ChatSender
Gets the display name of the command sender.
-
getChat
public Chat getChat()
Description copied from interface:ChatSender
Gets the chat the message was sent in.- Specified by:
getChat
in interfaceChatSender
- Overrides:
getChat
in classDefaultChatSender
- Returns:
- Chat instance.
-
-