mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-15 05:41:51 +00:00
Recommend -option instead of --option
Since knub-command-manager accepts both -option and --option now, this change should make options more intuitive to use. Both syntaxes are still supported and neither is getting deprecated for now.
This commit is contained in:
parent
bfe224925b
commit
bdf44c32ff
4 changed files with 27 additions and 27 deletions
|
@ -169,7 +169,7 @@
|
|||
}
|
||||
},
|
||||
renderOption(opt) {
|
||||
let str = `--${opt.name}`;
|
||||
let str = `-${opt.name}`;
|
||||
if (opt.shortcut) {
|
||||
str += `|-${opt.shortcut}`;
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ export class ChannelArchiverPlugin extends ZeppelinPlugin {
|
|||
this.bot,
|
||||
msg.channel,
|
||||
msg.author.id,
|
||||
"No `--attachment-channel` specified. Continue? Attachments will not be available in the log if their message is deleted.",
|
||||
"No `-attachment-channel` specified. Continue? Attachments will not be available in the log if their message is deleted.",
|
||||
);
|
||||
if (!confirmed) {
|
||||
msg.channel.createMessage(errorMessage("Canceled"));
|
||||
|
|
|
@ -592,11 +592,11 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
|
|||
return;
|
||||
}
|
||||
|
||||
// The moderator who did the action is the message author or, if used, the specified --mod
|
||||
// The moderator who did the action is the message author or, if used, the specified -mod
|
||||
let mod = msg.member;
|
||||
if (args.mod) {
|
||||
if (!this.hasPermission("can_act_as_other", { message: msg })) {
|
||||
msg.channel.createMessage(errorMessage("No permission for --mod"));
|
||||
msg.channel.createMessage(errorMessage("No permission for -mod"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -694,13 +694,13 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
|
|||
* The only difference between the two commands is in target member validation.
|
||||
*/
|
||||
async actualMuteCmd(user: User | UnknownUser, msg: Message, args: { time?: number; reason?: string; mod: Member }) {
|
||||
// The moderator who did the action is the message author or, if used, the specified --mod
|
||||
// The moderator who did the action is the message author or, if used, the specified -mod
|
||||
let mod = msg.member;
|
||||
let pp = null;
|
||||
|
||||
if (args.mod) {
|
||||
if (!this.hasPermission("can_act_as_other", { message: msg })) {
|
||||
msg.channel.createMessage(errorMessage("No permission for --mod"));
|
||||
msg.channel.createMessage(errorMessage("No permission for -mod"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -839,13 +839,13 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
|
|||
msg: Message,
|
||||
args: { time?: number; reason?: string; mod?: Member },
|
||||
) {
|
||||
// The moderator who did the action is the message author or, if used, the specified --mod
|
||||
// The moderator who did the action is the message author or, if used, the specified -mod
|
||||
let mod = msg.author;
|
||||
let pp = null;
|
||||
|
||||
if (args.mod) {
|
||||
if (!this.hasPermission("can_act_as_other", { message: msg })) {
|
||||
this.sendErrorMessage(msg.channel, "No permission for --mod");
|
||||
this.sendErrorMessage(msg.channel, "No permission for -mod");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -996,11 +996,11 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
|
|||
return;
|
||||
}
|
||||
|
||||
// The moderator who did the action is the message author or, if used, the specified --mod
|
||||
// The moderator who did the action is the message author or, if used, the specified -mod
|
||||
let mod = msg.member;
|
||||
if (args.mod) {
|
||||
if (!this.hasPermission("can_act_as_other", { message: msg })) {
|
||||
this.sendErrorMessage(msg.channel, "No permission for --mod");
|
||||
this.sendErrorMessage(msg.channel, "No permission for -mod");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1059,11 +1059,11 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
|
|||
return;
|
||||
}
|
||||
|
||||
// The moderator who did the action is the message author or, if used, the specified --mod
|
||||
// The moderator who did the action is the message author or, if used, the specified -mod
|
||||
let mod = msg.member;
|
||||
if (args.mod) {
|
||||
if (!this.hasPermission("can_act_as_other", { message: msg })) {
|
||||
this.sendErrorMessage(msg.channel, "No permission for --mod");
|
||||
this.sendErrorMessage(msg.channel, "No permission for -mod");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1123,11 +1123,11 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
|
|||
return;
|
||||
}
|
||||
|
||||
// The moderator who did the action is the message author or, if used, the specified --mod
|
||||
// The moderator who did the action is the message author or, if used, the specified -mod
|
||||
let mod = msg.member;
|
||||
if (args.mod) {
|
||||
if (!this.hasPermission("can_act_as_other", { message: msg })) {
|
||||
this.sendErrorMessage(msg.channel, "No permission for --mod");
|
||||
this.sendErrorMessage(msg.channel, "No permission for -mod");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1195,11 +1195,11 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
|
|||
const user = await this.resolveUser(args.user);
|
||||
if (!user) return this.sendErrorMessage(msg.channel, `User not found`);
|
||||
|
||||
// The moderator who did the action is the message author or, if used, the specified --mod
|
||||
// The moderator who did the action is the message author or, if used, the specified -mod
|
||||
let mod = msg.member;
|
||||
if (args.mod) {
|
||||
if (!this.hasPermission("can_act_as_other", { message: msg })) {
|
||||
this.sendErrorMessage(msg.channel, "No permission for --mod");
|
||||
this.sendErrorMessage(msg.channel, "No permission for -mod");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1265,11 +1265,11 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
|
|||
return;
|
||||
}
|
||||
|
||||
// The moderator who did the action is the message author or, if used, the specified --mod
|
||||
// The moderator who did the action is the message author or, if used, the specified -mod
|
||||
let mod = msg.member;
|
||||
if (args.mod) {
|
||||
if (!this.hasPermission("can_act_as_other", { message: msg })) {
|
||||
this.sendErrorMessage(msg.channel, "No permission for --mod");
|
||||
this.sendErrorMessage(msg.channel, "No permission for -mod");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1416,11 +1416,11 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
|
|||
return;
|
||||
}
|
||||
|
||||
// The moderator who did the action is the message author or, if used, the specified --mod
|
||||
// The moderator who did the action is the message author or, if used, the specified -mod
|
||||
let mod = msg.member;
|
||||
if (args.mod) {
|
||||
if (!this.hasPermission("can_act_as_other", { message: msg })) {
|
||||
this.sendErrorMessage(msg.channel, "No permission for --mod");
|
||||
this.sendErrorMessage(msg.channel, "No permission for -mod");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1545,9 +1545,9 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
|
|||
|
||||
if (!args.hidden && hiddenCases.length) {
|
||||
if (hiddenCases.length === 1) {
|
||||
lines.push(`*+${hiddenCases.length} hidden case, use "--hidden" to show it*`);
|
||||
lines.push(`*+${hiddenCases.length} hidden case, use "-hidden" to show it*`);
|
||||
} else {
|
||||
lines.push(`*+${hiddenCases.length} hidden cases, use "--hidden" to show them*`);
|
||||
lines.push(`*+${hiddenCases.length} hidden cases, use "-hidden" to show them*`);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1568,7 +1568,7 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
|
|||
options: [{ name: "mod", type: "Member" }],
|
||||
extra: {
|
||||
info: {
|
||||
description: "Show the most recent 5 cases by the specified --mod",
|
||||
description: "Show the most recent 5 cases by the specified -mod",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
|
|
@ -365,8 +365,8 @@ export class PostPlugin extends ZeppelinPlugin<TConfigSchema> {
|
|||
msg.channel.createMessage(
|
||||
trimLines(`
|
||||
<@!${msg.author.id}> You can now specify an embed's content directly at the end of the command:
|
||||
\`${prefix}post_embed --title="Some title" content goes here\`
|
||||
The \`--content\` option will soon be removed in favor of this.
|
||||
\`${prefix}post_embed -title "Some title" content goes here\`
|
||||
The \`-content\` option will soon be removed in favor of this.
|
||||
`),
|
||||
);
|
||||
}
|
||||
|
@ -440,8 +440,8 @@ export class PostPlugin extends ZeppelinPlugin<TConfigSchema> {
|
|||
msg.channel.createMessage(
|
||||
trimLines(`
|
||||
<@!${msg.author.id}> You can now specify an embed's content directly at the end of the command:
|
||||
\`${prefix}edit_embed --title="Some title" content goes here\`
|
||||
The \`--content\` option will soon be removed in favor of this.
|
||||
\`${prefix}edit_embed -title "Some title" content goes here\`
|
||||
The \`-content\` option will soon be removed in favor of this.
|
||||
`),
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue