mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-22 13:14:58 +05:00
Support for ptb and canary links
This commit is contained in:
parent
677bcce92a
commit
261be4eddc
1 changed files with 1 additions and 1 deletions
|
@ -48,7 +48,7 @@ class MessageCreate extends BaseEvent {
|
||||||
await updateXp(client, message, data);
|
await updateXp(client, message, data);
|
||||||
|
|
||||||
if (message.content.includes("discord.com/channels/")) {
|
if (message.content.includes("discord.com/channels/")) {
|
||||||
const link = message.content.match(/(https|http):\/\/(discord.com)\/(channels)\/\d+\/\d+\/\d+/g)[0],
|
const link = message.content.match(/(https|http):\/\/(ptb\.|canary\.)?(discord.com)\/(channels)\/\d+\/\d+\/\d+/g)[0],
|
||||||
ids = link.match(/\d+/g),
|
ids = link.match(/\d+/g),
|
||||||
channelId = ids[1],
|
channelId = ids[1],
|
||||||
messageId = ids[2];
|
messageId = ids[2];
|
||||||
|
|
Loading…
Reference in a new issue