update for discord.js
This commit is contained in:
parent
ac67342e43
commit
b38eeeab42
2 changed files with 9 additions and 7 deletions
|
@ -43,7 +43,7 @@ export const RoleAddCmd = selfGrantableRolesCmd({
|
|||
pluginData,
|
||||
msg.channel,
|
||||
`<@!${msg.author.id}> Unknown ${args.roleNames.length === 1 ? "role" : "roles"}`,
|
||||
{ users: true },
|
||||
{ users: [msg.author.id] },
|
||||
);
|
||||
lock.unlock();
|
||||
return;
|
||||
|
@ -88,7 +88,7 @@ export const RoleAddCmd = selfGrantableRolesCmd({
|
|||
pluginData,
|
||||
msg.channel,
|
||||
`<@!${msg.author.id}> Got an error while trying to grant you the roles`,
|
||||
{ users: true },
|
||||
{ users: [msg.author.id] },
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
@ -120,7 +120,9 @@ export const RoleAddCmd = selfGrantableRolesCmd({
|
|||
messageParts.push("couldn't recognize some of the roles");
|
||||
}
|
||||
|
||||
sendSuccessMessage(pluginData, msg.channel, `<@!${msg.author.id}> ${messageParts.join("; ")}`, { users: true });
|
||||
sendSuccessMessage(pluginData, msg.channel, `<@!${msg.author.id}> ${messageParts.join("; ")}`, {
|
||||
users: [msg.author.id],
|
||||
});
|
||||
|
||||
lock.unlock();
|
||||
},
|
||||
|
|
|
@ -51,14 +51,14 @@ export const RoleRemoveCmd = selfGrantableRolesCmd({
|
|||
msg.channel,
|
||||
`<@!${msg.author.id}> Removed ${removedRolesStr.join(", ")} ${removedRolesWord};` +
|
||||
` couldn't recognize the other roles you mentioned`,
|
||||
{ users: true },
|
||||
{ users: [msg.author.id] },
|
||||
);
|
||||
} else {
|
||||
sendSuccessMessage(
|
||||
pluginData,
|
||||
msg.channel,
|
||||
`<@!${msg.author.id}> Removed ${removedRolesStr.join(", ")} ${removedRolesWord}`,
|
||||
{ users: true },
|
||||
{ users: [msg.author.id] },
|
||||
);
|
||||
}
|
||||
} catch {
|
||||
|
@ -66,7 +66,7 @@ export const RoleRemoveCmd = selfGrantableRolesCmd({
|
|||
pluginData,
|
||||
msg.channel,
|
||||
`<@!${msg.author.id}> Got an error while trying to remove the roles`,
|
||||
{ users: true },
|
||||
{ users: [msg.author.id] },
|
||||
);
|
||||
}
|
||||
} else {
|
||||
|
@ -74,7 +74,7 @@ export const RoleRemoveCmd = selfGrantableRolesCmd({
|
|||
pluginData,
|
||||
msg.channel,
|
||||
`<@!${msg.author.id}> Unknown ${args.roleNames.length === 1 ? "role" : "roles"}`,
|
||||
{ users: true },
|
||||
{ users: [msg.author.id] },
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue