mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-06-08 08:05:03 +00:00
Various fixes
This commit is contained in:
parent
2c0e4b37ca
commit
cafcc2839e
15 changed files with 45 additions and 68 deletions
|
@ -37,7 +37,7 @@ export async function actualWarnCmd(
|
|||
{ confirmText: "Yes", cancelText: "No", restrictToId: authorId },
|
||||
);
|
||||
if (!reply) {
|
||||
pluginData.getPlugin(CommonPlugin).sendErrorMessage(context, "Warn cancelled by moderator");
|
||||
await pluginData.getPlugin(CommonPlugin).sendErrorMessage(context, "Warn cancelled by moderator");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -53,13 +53,16 @@ export async function actualWarnCmd(
|
|||
});
|
||||
|
||||
if (warnResult.status === "failed") {
|
||||
pluginData.getPlugin(CommonPlugin).sendErrorMessage(context, "Failed to warn user");
|
||||
const failReason = warnResult.error ? `: ${warnResult.error}` : "";
|
||||
|
||||
await pluginData.getPlugin(CommonPlugin).sendErrorMessage(context, `Failed to warn user${failReason}`);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
const messageResultText = warnResult.notifyResult.text ? ` (${warnResult.notifyResult.text})` : "";
|
||||
|
||||
pluginData
|
||||
await pluginData
|
||||
.getPlugin(CommonPlugin)
|
||||
.sendSuccessMessage(
|
||||
context,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue