-
Notifications
You must be signed in to change notification settings - Fork 10.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Chore: Convert slashCommands to typescript (#25592)
Co-authored-by: Eduardo Cabrera <eduardo.cabrera@rocket.chat> Co-authored-by: Leonardo Ostjen Couto <leonardoostjen@gmail.com> Co-authored-by: eduardofcabrera <64327259+eduardofcabrera@users.noreply.github.com> Co-authored-by: Guilherme Gazzo <guilhermegazzo@gmail.com>
- Loading branch information
1 parent
efaa2b0
commit 265299b
Showing
71 changed files
with
651 additions
and
645 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { Meteor } from 'meteor/meteor'; | ||
import type { IMessage } from '@rocket.chat/core-typings'; | ||
|
||
import { slashCommands } from '../../utils/lib/slashCommand'; | ||
/* | ||
* Gimme is a named function that will replace /gimme commands | ||
* @param {Object} message - The message object | ||
*/ | ||
|
||
function Gimme(_command: 'gimme', params: string, item: IMessage): void { | ||
const msg = item; | ||
msg.msg = `༼ つ ◕_◕ ༽つ ${params}`; | ||
Meteor.call('sendMessage', msg); | ||
} | ||
|
||
slashCommands.add('gimme', Gimme, { | ||
description: 'Slash_Gimme_Description', | ||
params: 'your_message_optional', | ||
}); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import type { IMessage } from '@rocket.chat/core-typings'; | ||
import { Meteor } from 'meteor/meteor'; | ||
|
||
import { slashCommands } from '../../utils/lib/slashCommand'; | ||
/* | ||
* Lenny is a named function that will replace /lenny commands | ||
* @param {Object} message - The message object | ||
*/ | ||
|
||
function LennyFace(_command: 'lennyface', params: string, item: IMessage): void { | ||
const msg = item; | ||
msg.msg = `${params} ( ͡° ͜ʖ ͡°)`; | ||
Meteor.call('sendMessage', msg); | ||
} | ||
|
||
slashCommands.add('lennyface', LennyFace, { | ||
description: 'Slash_LennyFace_Description', | ||
params: 'your_message_optional', | ||
}); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import type { IMessage } from '@rocket.chat/core-typings'; | ||
import { Meteor } from 'meteor/meteor'; | ||
|
||
import { slashCommands } from '../../utils/lib/slashCommand'; | ||
/* | ||
* Shrug is a named function that will replace /shrug commands | ||
* @param {Object} message - The message object | ||
*/ | ||
|
||
function Shrug(_command: 'shrug', params: string, item: IMessage): void { | ||
const msg = item; | ||
msg.msg = `${params} ¯\\_(ツ)_/¯`; | ||
Meteor.call('sendMessage', msg); | ||
} | ||
|
||
slashCommands.add('shrug', Shrug, { | ||
description: 'Slash_Shrug_Description', | ||
params: 'your_message_optional', | ||
}); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import type { IMessage } from '@rocket.chat/core-typings'; | ||
import { Meteor } from 'meteor/meteor'; | ||
|
||
import { slashCommands } from '../../utils/lib/slashCommand'; | ||
/* | ||
* Tableflip is a named function that will replace /Tableflip commands | ||
* @param {Object} message - The message object | ||
*/ | ||
|
||
function Tableflip(_command: 'tableflip', params: string, item: IMessage): void { | ||
const msg = item; | ||
msg.msg = `${params} (╯°□°)╯︵ ┻━┻`; | ||
Meteor.call('sendMessage', msg); | ||
} | ||
|
||
slashCommands.add('tableflip', Tableflip, { | ||
description: 'Slash_Tableflip_Description', | ||
params: 'your_message_optional', | ||
}); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import type { IMessage } from '@rocket.chat/core-typings'; | ||
import { Meteor } from 'meteor/meteor'; | ||
|
||
import { slashCommands } from '../../utils/lib/slashCommand'; | ||
/* | ||
* Unflip is a named function that will replace /unflip commands | ||
* @param {Object} message - The message object | ||
*/ | ||
|
||
function Unflip(_command: 'unflip', params: string, item: IMessage): void { | ||
const msg = item; | ||
msg.msg = `${params} ┬─┬ ノ( ゜-゜ノ)`; | ||
Meteor.call('sendMessage', msg); | ||
} | ||
|
||
slashCommands.add('unflip', Unflip, { | ||
description: 'Slash_TableUnflip_Description', | ||
params: 'your_message_optional', | ||
}); |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.