Skip to content
Snippets Groups Projects
Commit 8754af40 authored by Gabriel Engel's avatar Gabriel Engel
Browse files

add ASCII art commands

add: /tableflip /unflip
parents ebcc80c7 89d8d2e6
No related branches found
No related tags found
No related merge requests found
......@@ -78,13 +78,13 @@ rocketchat:piwik
rocketchat:push-notifications
rocketchat:reactions
rocketchat:slackbridge
rocketchat:slashcommands-asciiarts
rocketchat:slashcommands-invite
rocketchat:slashcommands-join
rocketchat:slashcommands-kick
rocketchat:slashcommands-leave
rocketchat:slashcommands-me
rocketchat:slashcommands-mute
rocketchat:slashcommands-shrug
rocketchat:slashcommands-topic
rocketchat:spotify
rocketchat:statistics
......@@ -146,4 +146,3 @@ todda00:friendly-slugs
underscorestring:underscore.string
yasaricli:slugify
yasinuslu:blaze-meta
......@@ -174,13 +174,13 @@ rocketchat:piwik@0.0.1
rocketchat:push-notifications@0.0.1
rocketchat:reactions@0.0.1
rocketchat:slackbridge@0.0.1
rocketchat:slashcommands-asciiarts@0.0.1
rocketchat:slashcommands-invite@0.0.1
rocketchat:slashcommands-join@0.0.1
rocketchat:slashcommands-kick@0.0.1
rocketchat:slashcommands-leave@0.0.1
rocketchat:slashcommands-me@0.0.1
rocketchat:slashcommands-mute@0.0.1
rocketchat:slashcommands-shrug@0.0.1
rocketchat:slashcommands-topic@0.0.1
rocketchat:sms@0.0.1
rocketchat:spotify@0.0.1
......
......@@ -953,7 +953,11 @@
"Site_Url" : "Site URL",
"Site_Url_Description" : "Example: https://chat.domain.com/",
"Skip" : "Skip",
"Slash_Gimme_Description" : "Displays ¯༼ つ ◕_◕ ༽つ¯ before your message",
"Slash_LennyFace_Description" : "Displays ¯( ͡° ͜ʖ ͡°)¯ after your message",
"Slash_Shrug_Description" : "Displays ¯\\_(ツ)_/¯ after your message",
"Slash_Tableflip_Description" : "Displays ¯(╯°□°)╯︵ ┻━┻",
"Slash_TableUnflip_Description" : "Displays ┬─┬ ノ( ゜-゜ノ)",
"Slash_Topic_Description" : "Set topic",
"Slash_Topic_Params" : "Topic message",
"Smileys_and_People" : "Smileys & People",
......
/*
* Gimme is a named function that will replace /gimme commands
* @param {Object} message - The message object
*/
function Gimme(command, params, item) {
if (command === 'gimme') {
var msg;
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') {
var msg;
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-shrug',
name: 'rocketchat:slashcommands-asciiarts',
version: '0.0.1',
summary: 'Message pre-processor that will translate /shrug commands',
summary: 'Message pre-processor that will add ascii arts to messages',
git: ''
});
......@@ -14,5 +14,9 @@ Package.onUse(function(api) {
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']);
});
/*
* Tableflip is a named function that will replace /Tableflip commands
* @param {Object} message - The message object
*/
function Tableflip(command, params, item) {
if (command === 'tableflip') {
var msg;
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') {
var msg;
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