Channelable

public protocol Channelable : PayloadType

A generic channel used in GlobalEvents.

  • Mentions the channel. For example #channelId

    Declaration

    Swift

    var mention: String { get }
  • Sends a message to the channel.

    let channel: Channelable = ...
    channel.send("Hi! I'm a bot")
    

    Declaration

    Swift

    @discardableResult
    func send(_ msg: String) -> EventLoopFuture<Messageable>

    Parameters

    msg

    Message content to send.

    Return Value

    The created message.