include branches in invite regex

This commit is contained in:
Cynthia Foxwell 2025-03-13 10:53:24 -06:00
parent 4ec730fed0
commit 5fb999ec5b
Signed by: Cynosphere
SSH key fingerprint: SHA256:H3SM8ufP/uxqLwKSH7xY89TDnbR9uOHzjLoBr0tlajk
2 changed files with 2 additions and 2 deletions

View file

@ -601,7 +601,7 @@ guildinfo.callback = async function (msg, line, args, {nolocal, debug}) {
invite = await hf.bot.requestHandler.request(
"GET",
`/invites/${guild.instant_invite.replace(
/(https?:\/\/)?discord(\.gg|(app)?.com\/invite)\//,
/(https?:\/\/)?(canary\.|ptb\.)?discord(\.gg|(app)?.com\/invite)\//,
""
)}?with_counts=true&with_expiration=true`
);

View file

@ -23,7 +23,7 @@ lookupinvite.addAlias("ii");
lookupinvite.callback = async function (msg, line) {
if (!line || line == "") return "Arguments required.";
line = line.replace(/(https?:\/\/)?discord(\.gg|(app)?.com\/invite)\//, "");
line = line.replace(/(https?:\/\/)?(canary\.|ptb\.)?discord(\.gg|(app)?.com\/invite)\//, "");
if (decodeURIComponent(line).indexOf("../") > -1) return "nuh uh";