mirror of
https://github.com/reality/dbot.git
synced 2025-01-11 12:32:36 +01:00
flashy module uses new url constructor api
This commit is contained in:
parent
cd3b468ada
commit
c1f642084d
@ -28,11 +28,8 @@ var flashy = function(dbot) {
|
|||||||
var text = event.input[2].trim().toUpperCase();
|
var text = event.input[2].trim().toUpperCase();
|
||||||
|
|
||||||
if(_.has(this.colourMap, colour)) {
|
if(_.has(this.colourMap, colour)) {
|
||||||
event.reply(dbot.t('url', {
|
event.reply(dbot.api.web.getUrl('flashy/' + colour + '/' +
|
||||||
'host': dbot.config.web.webHost,
|
encodeURIComponent(text)));
|
||||||
'port': dbot.config.web.webPort,
|
|
||||||
'path': 'flashy/' + colour + '/' + encodeURIComponent(text)
|
|
||||||
}));
|
|
||||||
} else {
|
} else {
|
||||||
var possibleColours = _.keys(this.colourMap).join(', ') + '.';
|
var possibleColours = _.keys(this.colourMap).join(', ') + '.';
|
||||||
event.reply('No such colour, brah. Available colours are: ' + possibleColours);
|
event.reply('No such colour, brah. Available colours are: ' + possibleColours);
|
||||||
|
Loading…
Reference in New Issue
Block a user