Package io.manebot.command
Class DefaultCommandSender
- java.lang.Object
-
- io.manebot.chat.DefaultChatSender
-
- io.manebot.command.CommandSender
-
- io.manebot.command.DefaultCommandSender
-
- All Implemented Interfaces:
ChatMessageReceiver
,ChatSender
public class DefaultCommandSender extends CommandSender
-
-
Constructor Summary
Constructors Constructor Description DefaultCommandSender(Conversation conversation, PlatformUser platformUser, User user)
-
Method Summary
Modifier and Type Method Description Conversation
getConversation()
Gets the conversation the message was sent in.java.lang.String
getDisplayName()
Gets the display name of the command sender.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.command.CommandSender
getChat, getParent
-
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
-
DefaultCommandSender
public DefaultCommandSender(Conversation conversation, PlatformUser platformUser, User user)
-
-
Method Detail
-
getUsername
public java.lang.String getUsername()
Description copied from interface:ChatSender
Gets the username of the command sender.- Specified by:
getUsername
in interfaceChatSender
- Overrides:
getUsername
in classCommandSender
-
getDisplayName
public java.lang.String getDisplayName()
Description copied from interface:ChatSender
Gets the display name of the command sender.- Specified by:
getDisplayName
in interfaceChatSender
- Overrides:
getDisplayName
in classCommandSender
-
getConversation
public Conversation getConversation()
Description copied from class:CommandSender
Gets the conversation the message was sent in.- Specified by:
getConversation
in classCommandSender
-
getUser
public User getUser()
Description copied from class:CommandSender
Gets the user this sender represents.- Specified by:
getUser
in classCommandSender
- Returns:
- User.
-
-