Skip to content

Commit

Permalink
fix: remove links from meaning
Browse files Browse the repository at this point in the history
  • Loading branch information
mxvsh committed Jul 16, 2021
1 parent 269e9b1 commit 1f33e15
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/modules/word/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,7 @@ const Answer = async (ctx: Context, params?: any) => {
let answerParts = [];

result.definition.split(" ").forEach((part) => {
answerParts.push(
part.replace(
/\[(.+)\]/g,
`<a href="https://t.me/${ctx.botInfo.username}?start=$1">$1</a>`
)
);
answerParts.push(part.replace(/\[(.+)\]/g, `$1`));
});

answer = answerParts.join(" ");
Expand All @@ -40,6 +35,6 @@ const Answer = async (ctx: Context, params?: any) => {

export default {
handler: Answer,
match: /^(\?|\/start) (.*)/,
match: /^\? (.*)/,
...meta,
};

0 comments on commit 1f33e15

Please sign in to comment.