var page = require('../../page.part')
var com = require('../../com.part')
module.exports = () => page({
section: 'docs',
tab: 'docs-basics',
path :'/docs/basics/publish-a-message.html',
content: `
Publish a message
${ com.code({ js: jsSnippet, bash: bashSnippet }) }
Read the log
`
})
var jsSnippet = `
sbot.publish({
type: 'post',
text: 'Hello, world!'
}, function (err, msg) {
// 'msg' includes the hash-id and headers
})
`
var bashSnippet = `
sbot publish --type post --text "Hello, world!"
`