Skip to content
This repository has been archived by the owner on Nov 2, 2023. It is now read-only.

Commit

Permalink
improve face text
Browse files Browse the repository at this point in the history
update README.md
  • Loading branch information
takayama-lily committed Aug 20, 2021
1 parent 7e010e3 commit 3b6c407
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# oicq

[![npm version](https://img.shields.io/npm/v/oicq.svg?logo=npm)](https://www.npmjs.com/package/oicq)
[![dm](https://shields.io/npm/dm/oicq)](https://www.npmjs.com/package/oicq)
[![node engine](https://img.shields.io/node/v/oicq.svg)](https://nodejs.org)
[![discord](https://img.shields.io/static/v1?label=chat&message=on%20discord&color=7289da&logo=discord)](https://discord.gg/gKnU7BARzv)

Expand Down
10 changes: 5 additions & 5 deletions lib/message/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,15 +296,15 @@ class Parser {
case 2: //face
msg.type = "face";
msg.data.id = elem[1];
brief = "[表情]";
msg.data.text = face.map[msg.data.id] || "表情";
brief = `[${msg.data.text}]`;
break;
case 33: //face(id>255)
msg.type = "face";
msg.data.id = elem[1];
if (face.map[msg.data.id])
msg.data.text = face.map[msg.data.id];
else if (elem[2])
msg.data.text = String(elem[2]);
msg.data.text = face.map[msg.data.id];
if (!msg.data.text)
msg.data.text = elem[2] ? String(elem[2]) : ("/" + msg.data.id);
brief = msg.data.text;
break;
case 6: //bface
Expand Down

0 comments on commit 3b6c407

Please sign in to comment.