Skip to content

Commit

Permalink
🐛 rename image element
Browse files Browse the repository at this point in the history
  • Loading branch information
XxLittleCxX committed Feb 15, 2024
1 parent 8055fe1 commit ab8e35f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "koishi-plugin-dcqq-relay",
"version": "0.9.0",
"version": "0.9.1",
"main": "lib/index.js",
"description": "Synchronize messages between discord and qq",
"repository": "https://github.com/koishijs/koishi-plugin-dcqq-relay",
Expand Down
6 changes: 3 additions & 3 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export async function apply(ctx: Context, config: Config) {
result.children.push(segment.text(`${username}: \n`));
let tmp = await segment.transformAsync(session.elements, {
face: (attrs) => (
<image url={`https://cdn.discordapp.com/emojis/${attrs.id}`} />
<img src={`https://cdn.discordapp.com/emojis/${attrs.id}`} />
),
file: (attrs) => `[文件: ${attrs.file}](${attrs.url})`,
record: (attrs) => `[音频: ${attrs.file}](${attrs.url})`,
Expand Down Expand Up @@ -298,7 +298,7 @@ export async function apply(ctx: Context, config: Config) {
} catch (e) { }
return `@[QQ: ${attrs.id}]${name} `;
},
async image(attrs) {
async img(attrs) {
if (attrs.type === "flash") {
return "";
}
Expand Down Expand Up @@ -347,7 +347,7 @@ export async function apply(ctx: Context, config: Config) {
// {msgs.map(v => {
// let newElements = segment.transform(v.elements, {
// at: (attrs) => `@[QQ: ${attrs.id}]`,
// image(attrs) {
// img(attrs) {
// if (attrs.type === "flash") {
// return "";
// }
Expand Down

0 comments on commit ab8e35f

Please sign in to comment.