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