Skip to content

Commit

Permalink
fix: tiktok link regex
Browse files Browse the repository at this point in the history
  • Loading branch information
lastarc committed Dec 30, 2023
1 parent 32cf33b commit 596fc8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ client.on(Events.InteractionCreate, async interaction => {

client.on(Events.MessageCreate, async message => {
const content = message.content;
const videoUrlMatch = content.match(/^.*https:\/\/(?:m|www|vm)?\.?tiktok\.com\/((?:.*\b(?:(?:usr|v|embed|user|video)\/|\?shareId=|&item_id=)(\d+))|\w+)/gim);
const videoUrlMatch = content.match(/https:\/\/(?:m|www|vm)?\.?tiktok\.com\/((?:.*\b(?:(?:usr|v|embed|user|video)\/|\?shareId=|&item_id=)(\d+))|\w+)/gim);

if (!videoUrlMatch) {
return;
Expand Down

0 comments on commit 596fc8c

Please sign in to comment.