mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-20 16:25:03 +00:00
Add isMention function
This commit is contained in:
parent
6f33f50cdf
commit
d8944dc961
1 changed files with 8 additions and 0 deletions
|
@ -217,6 +217,14 @@ export const TagsPlugin = zeppelinGuildPlugin<TagsPluginType>()("tags", {
|
|||
|
||||
return "";
|
||||
},
|
||||
|
||||
isMention: input => {
|
||||
if (typeof input !== "string") {
|
||||
return "";
|
||||
}
|
||||
|
||||
return input.match(/^<(?:@[!&]?|#)\d+>$/);
|
||||
},
|
||||
};
|
||||
|
||||
for (const [name, fn] of Object.entries(state.tagFunctions)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue