Skip to content

Commit 20a48a6

Browse files
CommandMCbgianfo
authored andcommitted
QuoteCommand: Don't limit the length of guild/channel/message IDs
New message IDs can be 19 characters long, and they may grow up to 2^64-1 (20 characters) in the future.
1 parent a798adc commit 20a48a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/commands/quoteCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import Command from "./command";
2424

2525
export class QuoteCommand extends Command {
2626
private readonly messageLinkRegex: RegExp =
27-
/https:\/\/(?:(?:ptb|canary)\.)?discord\.com\/channels\/(?<guild>[0-9]{17,18})\/(?<channel>[0-9]{17,18})\/(?<message>[0-9]{17,18})/;
27+
/https:\/\/(?:(?:ptb|canary)\.)?discord\.com\/channels\/(?<guild>\d*)\/(?<channel>\d*)\/(?<message>\d*)$/;
2828

2929
override data() {
3030
if (!QUOTE_ROLE_ID) return [];

0 commit comments

Comments
 (0)