configurable prefix
This commit is contained in:
parent
6727a1268d
commit
624934c902
8
bot.js
8
bot.js
@ -79,12 +79,14 @@ async function twitter(chan, provfeed, n) {
|
|||||||
|
|
||||||
bot.addListener('message', function(nick, to, text, from) {
|
bot.addListener('message', function(nick, to, text, from) {
|
||||||
var args = text.split(' ');
|
var args = text.split(' ');
|
||||||
if (args[0] === 'm!help') {
|
if (args[0] === config.irc.prefix+'help') {
|
||||||
help(to, args[1]);
|
help(to, args[1]);
|
||||||
} else if (args[0] === 'm!feed') {
|
} else if (args[0] === config.irc.prefix+'feed') {
|
||||||
feed(to, args[1], args[2]);
|
feed(to, args[1], args[2]);
|
||||||
} else if (args[0] === 'm!twitter') {
|
} else if (args[0] === config.irc.prefix+'twitter') {
|
||||||
twitter(to, args[1], args[2])
|
twitter(to, args[1], args[2])
|
||||||
|
} else if (args[0] === config.irc.prefix+'set') {
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -11,7 +11,8 @@
|
|||||||
"realname": "git.supernets.org/hogwart7/mercury",
|
"realname": "git.supernets.org/hogwart7/mercury",
|
||||||
"autorejoin": "true",
|
"autorejoin": "true",
|
||||||
"floodprotection": "false",
|
"floodprotection": "false",
|
||||||
"floodprotectiondelay": "0"
|
"floodprotectiondelay": "0",
|
||||||
|
"prefix": "m!"
|
||||||
},
|
},
|
||||||
"colours": {
|
"colours": {
|
||||||
"date": "11",
|
"date": "11",
|
||||||
|
Loading…
Reference in New Issue
Block a user