3
0
Fork 0
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:
Usoka 2021-05-02 20:55:02 +12:00
parent 6f33f50cdf
commit d8944dc961

View file

@ -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)) {