Actually fixed rock paper scissors emoji input.

This commit is contained in:
ThePendulum 2022-10-24 23:00:05 +02:00
parent 0d375cac92
commit 34fb977e77
1 changed files with 2 additions and 2 deletions

View File

@ -79,8 +79,8 @@ async function onCommand(args, context) {
}
async function onMessage(args, context) {
const emojiHand = emojiLookup[context.message.body];
const emojiAliasHand = config.platform === 'schat' && context.message.originalBody?.match(/^:((?:rock)|(?:paper)|(?:scissors)|(?:scissoring)|(?:page_facing_up)|(?:page_with_curl)):$/)?.[1];
const emojiHand = emojiLookup[context.message.body.trim()];
const emojiAliasHand = config.platform === 'schat' && context.message.originalBody?.trim().match(/^:((?:rock)|(?:paper)|(?:scissors)|(?:scissoring)|(?:page_facing_up)|(?:page_with_curl)):$/)?.[1];
const hand = emojiHand || emojiAliases[emojiAliasHand];