Skip to content
Snippets Groups Projects
Unverified Commit 5e20988f authored by Bradley Hilton's avatar Bradley Hilton
Browse files

Add the asciiarts commands back in for now until the Rocket.Chat Apps are officially released

parent f5155f7e
No related branches found
No related tags found
No related merge requests found
......@@ -114,6 +114,7 @@ rocketchat:apps
rocketchat:sandstorm
rocketchat:slackbridge
rocketchat:slashcommands-archive
rocketchat:slashcommands-asciiarts
rocketchat:slashcommands-create
rocketchat:slashcommands-help
rocketchat:slashcommands-invite
......
......@@ -129,6 +129,7 @@ rocketchat:accounts@0.0.1
rocketchat:action-links@0.0.1
rocketchat:analytics@0.0.2
rocketchat:api@0.0.1
rocketchat:apps@1.0.0
rocketchat:assets@0.0.1
rocketchat:authorization@0.0.1
rocketchat:autolinker@0.0.1
......@@ -198,10 +199,10 @@ rocketchat:otr@0.0.1
rocketchat:postcss@1.0.0
rocketchat:push-notifications@0.0.1
rocketchat:reactions@0.0.1
rocketchat:apps@1.0.0
rocketchat:sandstorm@0.0.1
rocketchat:slackbridge@0.0.1
rocketchat:slashcommands-archive@0.0.1
rocketchat:slashcommands-asciiarts@0.0.1
rocketchat:slashcommands-create@0.0.1
rocketchat:slashcommands-help@0.0.1
rocketchat:slashcommands-invite@0.0.1
......
/*
* Gimme is a named function that will replace /gimme commands
* @param {Object} message - The message object
*/
function Gimme(command, params, item) {
if (command === 'gimme') {
const msg = item;
msg.msg = `༼ つ ◕_◕ ༽つ ${ params }`;
Meteor.call('sendMessage', msg);
}
}
RocketChat.slashCommands.add('gimme', Gimme, {
description: 'Slash_Gimme_Description',
params: 'your_message_optional'
});
/*
* Lenny is a named function that will replace /lenny commands
* @param {Object} message - The message object
*/
function LennyFace(command, params, item) {
if (command === 'lennyface') {
const msg = item;
msg.msg = `${ params } ( ͡° ͜ʖ ͡°)`;
Meteor.call('sendMessage', msg);
}
}
RocketChat.slashCommands.add('lennyface', LennyFace, {
description: 'Slash_LennyFace_Description',
params: 'your_message_optional'
});
Package.describe({
name: 'rocketchat:slashcommands-asciiarts',
version: '0.0.1',
summary: 'Message pre-processor that will add ascii arts to messages',
git: ''
});
Package.onUse(function(api) {
api.use([
'rocketchat:lib'
]);
api.use('ecmascript');
api.addFiles('gimme.js', ['server', 'client']);
api.addFiles('lenny.js', ['server', 'client']);
api.addFiles('shrug.js', ['server', 'client']);
api.addFiles('tableflip.js', ['server', 'client']);
api.addFiles('unflip.js', ['server', 'client']);
});
/*
* Shrug is a named function that will replace /shrug commands
* @param {Object} message - The message object
*/
function Shrug(command, params, item) {
if (command === 'shrug') {
const msg = item;
msg.msg = `${ params } ¯\\_(ツ)_/¯`;
Meteor.call('sendMessage', msg);
}
}
RocketChat.slashCommands.add('shrug', Shrug, {
description: 'Slash_Shrug_Description',
params: 'your_message_optional'
});
/*
* Tableflip is a named function that will replace /Tableflip commands
* @param {Object} message - The message object
*/
function Tableflip(command, params, item) {
if (command === 'tableflip') {
const msg = item;
msg.msg = `${ params } (╯°□°)╯︵ ┻━┻`;
Meteor.call('sendMessage', msg);
}
}
RocketChat.slashCommands.add('tableflip', Tableflip, {
description: 'Slash_Tableflip_Description',
params: 'your_message_optional'
});
/*
* Unflip is a named function that will replace /unflip commands
* @param {Object} message - The message object
*/
function Unflip(command, params, item) {
if (command === 'unflip') {
const msg = item;
msg.msg = `${ params } ┬─┬ ノ( ゜-゜ノ)`;
Meteor.call('sendMessage', msg);
}
}
RocketChat.slashCommands.add('unflip', Unflip, {
description: 'Slash_TableUnflip_Description',
params: 'your_message_optional'
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment