3
0
mirror of https://github.com/reality/dbot.git synced 2024-12-24 19:52:36 +01:00

Added Sample folder for (easier) module development.

This commit is contained in:
thoso 2014-02-20 04:33:56 +01:00
parent ade1dcd5e8
commit d1b72fe443
5 changed files with 79 additions and 0 deletions

25
modules/SAMPLE/README.md Normal file
View File

@ -0,0 +1,25 @@
## FOO
bar.
### Description
This module provides a command which allows users to foobar.
### Dependencies
It has following dependencies:
node-wolfram : https://github.com/strax/node-wolfram
### config.json
foo
### Commands
#### ~foo [(bar]
Example:
~foo bar
### TODO

View File

@ -0,0 +1,4 @@
{
"foo": true,
"foo": "bar"
}

39
modules/SAMPLE/foo.js_.js Normal file
View File

@ -0,0 +1,39 @@
/**
* Module Name: foo
* Description: bar.
* Requires: foo [bar]
*/
var _ = require('underscore')._,
bar = require('foo');//dependencies
var foo = function(dbot) { //name of module
this.ApiRoot = 'API_ROOT_HERE';
this.internalAPI = {
//code for internal api here
};
this.api = {
//code for api here
};
this.commands = {
//code for commands here
};
this.onLoad = function() {
//code for stuff to be done on load here
};
this.onDestroy = function() {
//stuff to be done on destroy here
};
}
};
exports.fetch = function(dbot) {
return new foo(dbot); //name of module
};

View File

@ -0,0 +1,8 @@
{
"foo": {
"en": "{output} bar"
},
"foo2": {
"en": "Something went wrong :( Example:'~foo bar'"
}
}

View File

@ -0,0 +1,3 @@
{
"~foo": "~foo [bar]"
}