import type { SlashCommandCallbackParams } from '@rocket.chat/core-typings'; import { sdk } from '../../lib/SDKClient'; import { slashCommands } from '../../lib/slashCommand'; /* * Unflip is a named function that will replace /unflip commands * @param {Object} message - The message object */ slashCommands.add({ command: 'unflip', callback: async ({ message, params }: SlashCommandCallbackParams<'unflip'>): Promise => { const msg = message; await sdk.rest.post('/v1/chat.sendMessage', { message: { ...msg, msg: `${params} ┬─┬ ノ( ゜-゜ノ)` } }); }, options: { description: 'Slash_TableUnflip_Description', params: 'your_message_optional', clientOnly: true, }, });