utility.linvite: try 2
This commit is contained in:
parent
26fb765387
commit
ad3700bb82
1 changed files with 3 additions and 3 deletions
|
@ -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`,
|
||||
|
|
Loading…
Reference in a new issue