{"record":{"id":"422670750e77489b","repo":"jackwener/OpenCLI","slug":"emoji-required-the-unicode-emoji-to-remove","errorCode":null,"errorMessage":"emoji required (the unicode emoji to remove)","messagePattern":"emoji required \\(the unicode emoji to remove\\)","errorType":"validation","errorClass":"ArgumentError","httpStatus":null,"severity":"error","filePath":"clis/slock/reaction-remove.js","lineNumber":29,"sourceCode":"  name: 'reaction-remove',\n  access: 'write',\n  description: 'Remove your emoji reaction from a message (DELETE /messages/:id/reactions).',\n  domain: SLOCK_DOMAIN,\n  strategy: Strategy.COOKIE,\n  browser: true,\n  siteSession: 'persistent',\n  args: [\n    { name: 'messageId', positional: true, required: true, help: 'Full messageId UUID (short ids rejected)' },\n    { name: 'emoji', positional: true, required: true, help: 'The unicode emoji to remove, e.g. 👍' },\n    { name: 'server', help: 'Override active server' },\n  ],\n  columns: ['messageId', 'emoji', 'result'],\n  func: async (page, kwargs) => {\n    let id;\n    try { id = assertMessageIdShape(String(kwargs.messageId ?? '')); }\n    catch (e) { throw new ArgumentError(e.message); }\n    const emoji = String(kwargs.emoji ?? '').trim();\n    if (!emoji) throw new ArgumentError('emoji required (the unicode emoji to remove)');\n    await page.goto(SLOCK_HOME_URL);\n    const snippet = buildFetchSnippet({\n      method: 'DELETE',\n      path: `/messages/${id}/reactions`,\n      body: { emoji },\n      serverScoped: true,\n      serverIdOverride: kwargs.server,\n    });\n    const result = await page.evaluate(`(async () => { ${snippet} })()`);\n    dispatchEvaluateResult(result);\n    return [{ messageId: id, emoji, result: 'removed' }];\n  },\n});\n","sourceCodeStart":11,"sourceCodeEnd":43,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/slock/reaction-remove.js#L11-L43","documentation":"reaction-remove requires a non-empty --emoji identifying which reaction to delete; an empty or whitespace-only value raises this ArgumentError. Without the emoji the DELETE /messages/<id>/reactions body would be meaningless.","triggerScenarios":"Running `slock reaction-remove` without --emoji, with `--emoji \"\"`, `--emoji=`, or a whitespace-only value.","commonSituations":"Script variable holding the emoji was unset/empty; encoding issue dropped the emoji from argv; typo where the flag name was wrong so kwargs.emoji defaulted to '' via the `?? ''` fallback.","solutions":["Pass the exact unicode emoji of the reaction to remove: `--emoji \"👍\"`","Check the flag spelling — a misspelled flag falls back to empty via `kwargs.emoji ?? ''`","Ensure UTF-8 encoding in the shell/script so the emoji reaches argv"],"exampleFix":"// before\n$ slock reaction-remove --messageId <uuid> --emoj \"👍\"   # typo, emoji empty\n// after\n$ slock reaction-remove --messageId <uuid> --emoji \"👍\"","handlingStrategy":"validation","validationCode":"const emoji = String(kwargs.emoji ?? '').trim();\nif (!emoji) throw new Error('--emoji required: pass the unicode emoji of the reaction to remove');","typeGuard":"function isEmoji(v) {\n  return typeof v === 'string' && v.trim().length > 0 &&\n    /\\p{Extended_Pictographic}/u.test(v.trim());\n}","tryCatchPattern":"try {\n  await cli('reaction-remove', { messageId, emoji });\n} catch (e) {\n  if (e instanceof ArgumentError && e.message.includes('emoji required')) {\n    console.error('--emoji was empty; verify the variable holding the emoji and quote it in the shell.');\n  } else throw e;\n}","preventionTips":["Pass the exact emoji that was added (identical codepoints, including modifiers/skin tones)","Quote emoji in shell scripts and check variables are set before interpolation","Verify the flag name is --emoji","Keep emoji constants in one place in wrapper scripts to avoid drift"],"tags":["argument-validation","missing-argument","input-validation"],"backgroundTag":"missing-required-argument","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}