-
Channel this message was sent in. Can be downcast to backend specific type.
Declaration
Swift
var gChannel: Channelable { get } -
Content of the message.
Declaration
Swift
var content: String { get } -
Author of the message. Can be downcast to the backend specific type.
Declaration
Swift
var gAuthor: Userable { get } -
Send a message back to the received message.
let message: Messageable = ... // !ping mesasge.reply("Pong!")Declaration
Swift
@discardableResult func reply(_ content: String) -> EventLoopFuture<Messageable>Parameters
contentContent to reply with.
Return Value
The created message.
-
Update a message to new content.
let message: Messageable = ... // This message will self destruct. message.edit("Self destruct complete.")Declaration
Swift
@discardableResult func edit(_ content: String) -> EventLoopFuture<Messageable>Parameters
contentContent to update the message to.
Return Value
The updated message.
-
Deletes the message.
Declaration
Swift
@discardableResult func delete() -> EventLoopFuture<Void> -
error(_:Default implementationon: ) Sends an error that occured on a command.
Override this to add custom formatting to error messages. A default implementation is supplied.
Default Implementation
Declaration
Swift
func error(_ error: Error, on command: _ExecutableCommand)Parameters
errorThe error that occured. Usually a
CommandError.commandThe command that the error occured on.
View on GitHub
Messageable Protocol Reference