Skip to content

Instantly share code, notes, and snippets.

@dcsan
Created December 27, 2016 11:41
Show Gist options
  • Save dcsan/b5da8d61fb9fe2845ed37ba24ab21e0a to your computer and use it in GitHub Desktop.
Save dcsan/b5da8d61fb9fe2845ed37ba24ab21e0a to your computer and use it in GitHub Desktop.
bots.json
// keywords will trigger anywhere inside a block of text
const keywords = {
"spanish food": "I love Paella!",
"thai food": "I love TomYum soup!",
// you can have multiline texts
// surround it with backticks: ` ` (not single ' ' quotes )
"san francisco": `The Golden Gate City!
I love san francisco!
▶️ type help for more ℹ️
`
}
// these get posted randomly
// based on the total of the 'chance' field eg 10/total
const random = [
{
chance: 50, // 50/total = large chance of saying nothing
text: null
},
{
chance: 10,
text: "....."
},
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment