Instance Method

send(_:to:then:)

Sends a message to channel

Declaration

func send(_ content: [String : Any], to channelId: Snowflake, then completion: ((Message?, RequestError?) -> Void)? = nil)

Parameters

content

Dictionary containing info on message

channelId

Channel to send message to

Content Dictionary Params

  • content: Message to send

  • username: The username the webhook will send with the message

  • avatar_url: The url of the user the webhook will send

  • tts: Whether or not this message is tts

  • file: The url of the image to send

  • embed: The embed object to send. Refer to Embed structure