include branches in invite regex
This commit is contained in:
parent
4ec730fed0
commit
5fb999ec5b
2 changed files with 2 additions and 2 deletions
|
@ -601,7 +601,7 @@ guildinfo.callback = async function (msg, line, args, {nolocal, debug}) {
|
||||||
invite = await hf.bot.requestHandler.request(
|
invite = await hf.bot.requestHandler.request(
|
||||||
"GET",
|
"GET",
|
||||||
`/invites/${guild.instant_invite.replace(
|
`/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`
|
)}?with_counts=true&with_expiration=true`
|
||||||
);
|
);
|
||||||
|
|
|
@ -23,7 +23,7 @@ lookupinvite.addAlias("ii");
|
||||||
lookupinvite.callback = async function (msg, line) {
|
lookupinvite.callback = async function (msg, line) {
|
||||||
if (!line || line == "") return "Arguments required.";
|
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";
|
if (decodeURIComponent(line).indexOf("../") > -1) return "nuh uh";
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue