mirror of
https://github.com/reality/dbot.git
synced 2024-12-24 11:42:36 +01:00
Merge github.com:reality/depressionbot into database
This commit is contained in:
commit
712db49274
@ -50,6 +50,7 @@ var command = function(dbot) {
|
||||
});
|
||||
}
|
||||
}
|
||||
dbot.api.event.emit('command', [ event ]);
|
||||
dbot.save();
|
||||
} else {
|
||||
if(commandName !== '~') {
|
||||
|
@ -8,5 +8,6 @@
|
||||
"autoadd": {
|
||||
"e49e686582ce3f60cb51d00c10924861": "facebookman",
|
||||
"b11b634c74562bcd4e5d17b0d90987be": "raffleguy"
|
||||
}
|
||||
},
|
||||
"outputPrefix": "\u00038imgur\u000f"
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ var imgur = function(dbot) {
|
||||
if(matches[1]) {
|
||||
this.api.getImageInfo(matches[1], function(imgData) {
|
||||
var info = this.internalAPI.infoString(imgData);
|
||||
if(info) event.reply('[' + info + ']');
|
||||
if(info) event.reply(dbot.t('imgurinfo', { 'info': info }));
|
||||
}.bind(this));
|
||||
}
|
||||
}.bind(this);
|
||||
|
@ -3,5 +3,8 @@
|
||||
"en": "might be NSFW",
|
||||
"na'vi": "kxawm ke wivìntxu evengur",
|
||||
"nl": "bevat mogelijk gevoelige beelden"
|
||||
},
|
||||
"imgurinfo": {
|
||||
"en": "[{info}]"
|
||||
}
|
||||
}
|
||||
|
7
modules/log/config.json
Normal file
7
modules/log/config.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"logChannel": {
|
||||
"aberwiki": "#dbot"
|
||||
},
|
||||
"ignorable": false,
|
||||
"dependencies": [ "event", "command" ]
|
||||
}
|
24
modules/log/log.js
Normal file
24
modules/log/log.js
Normal file
@ -0,0 +1,24 @@
|
||||
/**
|
||||
* Name: Log
|
||||
* Description: Log commands to a channel.
|
||||
*/
|
||||
var _ = require('underscore')._;
|
||||
|
||||
var log = function(dbot) {
|
||||
this.onLoad = function() {
|
||||
dbot.api.event.addHook('command', function(event) {
|
||||
var logChannel = this.config.logChannel[event.server];
|
||||
if(logChannel) {
|
||||
dbot.say(event.server, logChannel, dbot.t('log_message', {
|
||||
'time': new Date().toUTCString(),
|
||||
'command': event.message,
|
||||
'user': event.user
|
||||
}));
|
||||
}
|
||||
}.bind(this));
|
||||
}.bind(this);
|
||||
};
|
||||
|
||||
exports.fetch = function(dbot) {
|
||||
return new log(dbot);
|
||||
};
|
5
modules/log/strings.json
Normal file
5
modules/log/strings.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"log_message": {
|
||||
"en": "[{time}] {user}: {command}"
|
||||
}
|
||||
}
|
3
modules/reddit/config.json
Normal file
3
modules/reddit/config.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"outputPrefix": "\u000312reddit\u000f"
|
||||
}
|
Loading…
Reference in New Issue
Block a user