Skip to content

Commit

Permalink
QuoteCommand: Don't limit the length of guild/channel/message IDs
Browse files Browse the repository at this point in the history
New message IDs can be 19 characters long, and they may grow up to
2^64-1 (20 characters) in the future.
  • Loading branch information
CommandMC authored and bgianfo committed Dec 19, 2023
1 parent a798adc commit 20a48a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/commands/quoteCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import Command from "./command";

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

override data() {
if (!QUOTE_ROLE_ID) return [];
Expand Down

0 comments on commit 20a48a6

Please sign in to comment.