mirror of
https://github.com/yuzu-emu/Command-fix
synced 2024-11-24 23:48:13 +00:00
16 lines
433 B
JavaScript
16 lines
433 B
JavaScript
var app = require('../app.js');
|
|
var logger = require('../logging.js');
|
|
|
|
var regex = /[^\<]\#\d+[^\>]/;
|
|
|
|
exports.trigger = function(message) {
|
|
return regex.test(message.content);
|
|
}
|
|
|
|
exports.execute = function(message) {
|
|
var match = regex.exec(message.content);
|
|
if (match) {
|
|
var msg = `Github Pull Request: https://github.com/citra-emu/citra/pull/${match[0].substring(1).trim()}`;
|
|
message.channel.sendMessage(msg);
|
|
}
|
|
}
|