utility.linvite: try 2

This commit is contained in:
Cynthia Foxwell 2023-01-26 22:49:56 -07:00
parent 26fb765387
commit ad3700bb82
1 changed files with 3 additions and 3 deletions

View File

@ -271,14 +271,14 @@ lookupinvite.category = CATEGORY;
lookupinvite.helpText = "Lookup an invite";
lookupinvite.usage = "<invite code>";
lookupinvite.addAlias("linvite");
lookupinvite.callback = async function (msg, line) {
if (!line) {
lookupinvite.callback = async function (msg, line, [code]) {
if (!code) {
return "No arguments passed.";
}
const invite = await hf.bot.requestHandler.request({
method: "GET",
path: `/invites/${line.replace(
path: `/invites/${code.replace(
/(https?:\/\/)?discord\.gg\//,
""
)}?with_counts=1`,