Commit 60ebbdfc authored by nanahira's avatar nanahira

fix bad console.log

parent 5a4fdf1d
import { App, segment } from 'koishi';
import TargetPlugin from '../src';
import TargetPlugin from '../dist';
import * as Help from '@koishijs/plugin-help';
import ExtrasInDev from './extras';
import fs from 'fs';
......
import { segment, Universal, Element, Awaitable } from 'koishi';
import { ContactInterface } from 'wechaty/src/user-modules/contact';
import { RoomInterface } from 'wechaty/src/user-modules/room';
import { MessageInterface } from 'wechaty/src/user-modules/message';
import type { ContactInterface } from 'wechaty/src/user-modules/contact';
import type { RoomInterface } from 'wechaty/src/user-modules/room';
import type { MessageInterface } from 'wechaty/src/user-modules/message';
import WechatyBot from './index';
import FileType from 'file-type';
......@@ -80,10 +80,8 @@ export async function messageToElement(
let text = message.text();
for (const mention of mentions) {
const name = mention.name();
console.log('mention', name);
text = text.replace(new RegExp(`@${name}\\s+`, 'g'), '');
}
console.log(text);
elements.push(segment.text(text));
break;
case MessageType.Image:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment