https://github.com/magnificentpako/botpress-simplecommands
https://github.com/magnificentpako/botpress-simplecommands
botpress commands js
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/magnificentpako/botpress-simplecommands
- Owner: MagnificentPako
- License: gpl-3.0
- Created: 2017-02-19T15:40:57.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-02-19T16:14:35.000Z (over 8 years ago)
- Last Synced: 2025-02-13T13:16:51.631Z (4 months ago)
- Topics: botpress, commands, js
- Language: JavaScript
- Size: 21.5 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Installation
```
botpress install simplecommands
```# Usage
```js
bp.addCommand("help", "discord", (event, next, args) => {
var msg = ""
if(args.length === 0) {
msg = "There's no help available right now."
}else{
msg = "You don't need help with " + args[0] + "."
}
bp.discord.sendText(event.channel.id, msg)
})bp.addCommand("help", "irc", (event, next, args) => {
bp.irc.sendMessage(event.channel, "There's no help available right now.")
})
```