diff --git a/src/index.mjs b/src/index.mjs index f6c0268..e4f7bb5 100644 --- a/src/index.mjs +++ b/src/index.mjs @@ -4,7 +4,7 @@ import cfg from '../config.json' assert { type: 'json' }; const bot = await new cuffeo(cfg.clients); -const g_cards = { "♠": "S", "♣": "C", "♦": "D", "♥": "H" }; +const g_suits = { "♠": "S", "♣": "C", "♦": "D", "♥": "H" }; const stripColors = msg => msg.replace(/\x03\d{0,2}(,\d{0,2}|\x02\x02)?/g, ''); @@ -12,9 +12,9 @@ const parseCards = msg => { const output = []; for(const c of stripColors(msg).match(/(\w+)([♠♣️♦♥️️])/g)) { if(c.length === 3) - output.push(`T${g_cards[c[2]]}`); + output.push(`T${g_suits[c[2]]}`); else - output.push(`${c[0]}${g_cards[c[1]]}`); + output.push(`${c[0]}${g_suits[c[1]]}`); } return output; };