$codeblock
Returns the content input in markdown codeblock with optional syntax highlighting.

FUNCTION USAGE

  • $codeblock[input]
  • $codeblock[input;syntax]

Properties:

input - The message to be placed into codeblock. syntax - Define as true or yes to add javascript syntax highlighting to the codeblock message. Otherwise, the function will simply return message in plain codeblock.

Example 1: Inputs "Hello!" into a codeblock with a syntax highlighting.

bot.Command({
name: "code",
code: `
$codeblock[Hello!;yes]
`
})

Example 2: Inputs "hello" into a codeblock.

bot.Command({
name: "code",
code: `
$codeblock[Hello!]
`
})
Copy link