From Bright Pattern Documentation
Jump to: navigation, search
• 5.19

Chat Directive: Attachment

The attachment directive sends audio. video, images, and files through:


Format


The attachment directive consists of a forward slash followed by the word attachment, a URL and an optional attachment type.

Attachment directive format
/attachment : <URL>[, attachment type]



Info.40x40.png Available attachment types are audio, video, or image. Several messengers, like Twitter and LINE, do not permit sending attachments without identifying the attachment type.



Formatting Rules


  • Directives are case sensitive.
  • Separate a directive from its parameters with a colon or whitespace.
  • Separate multiple parameters with commas.
  • Enclose string parameters in double quotes.
  • Add required parameters before optional parameters.
  • An optional parameter value may be an empty string.


Info.40x40.png Separating a directive from its parameters with whitespace is allowed for backward compatibility. The recommended separator is a colon, except for the buttons directive which only accepts whitespace between the directive and its parameters.


Examples


Send a .txt file:
/attachment https://example.com/file.txt 
Send audio:
attachment : https://example.com/song.wav, audio
Send video:
/attachment : https://example.com/movie.mp4, video
Send an image:
/attachment : https://example.com/photo.img, image


See also:



< Previous | Next >