mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-16 14:11:50 +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) {
|
renderOption(opt) {
|
||||||
let str = `--${opt.name}`;
|
let str = `-${opt.name}`;
|
||||||
if (opt.shortcut) {
|
if (opt.shortcut) {
|
||||||
str += `|-${opt.shortcut}`;
|
str += `|-${opt.shortcut}`;
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,7 +73,7 @@ export class ChannelArchiverPlugin extends ZeppelinPlugin {
|
||||||
this.bot,
|
this.bot,
|
||||||
msg.channel,
|
msg.channel,
|
||||||
msg.author.id,
|
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) {
|
if (!confirmed) {
|
||||||
msg.channel.createMessage(errorMessage("Canceled"));
|
msg.channel.createMessage(errorMessage("Canceled"));
|
||||||
|
|
|
@ -592,11 +592,11 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
|
||||||
return;
|
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;
|
let mod = msg.member;
|
||||||
if (args.mod) {
|
if (args.mod) {
|
||||||
if (!this.hasPermission("can_act_as_other", { message: msg })) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -694,13 +694,13 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
|
||||||
* The only difference between the two commands is in target member validation.
|
* 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 }) {
|
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 mod = msg.member;
|
||||||
let pp = null;
|
let pp = null;
|
||||||
|
|
||||||
if (args.mod) {
|
if (args.mod) {
|
||||||
if (!this.hasPermission("can_act_as_other", { message: msg })) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -839,13 +839,13 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
|
||||||
msg: Message,
|
msg: Message,
|
||||||
args: { time?: number; reason?: string; mod?: Member },
|
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 mod = msg.author;
|
||||||
let pp = null;
|
let pp = null;
|
||||||
|
|
||||||
if (args.mod) {
|
if (args.mod) {
|
||||||
if (!this.hasPermission("can_act_as_other", { message: msg })) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -996,11 +996,11 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
|
||||||
return;
|
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;
|
let mod = msg.member;
|
||||||
if (args.mod) {
|
if (args.mod) {
|
||||||
if (!this.hasPermission("can_act_as_other", { message: msg })) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1059,11 +1059,11 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
|
||||||
return;
|
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;
|
let mod = msg.member;
|
||||||
if (args.mod) {
|
if (args.mod) {
|
||||||
if (!this.hasPermission("can_act_as_other", { message: msg })) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1123,11 +1123,11 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
|
||||||
return;
|
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;
|
let mod = msg.member;
|
||||||
if (args.mod) {
|
if (args.mod) {
|
||||||
if (!this.hasPermission("can_act_as_other", { message: msg })) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1195,11 +1195,11 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
|
||||||
const user = await this.resolveUser(args.user);
|
const user = await this.resolveUser(args.user);
|
||||||
if (!user) return this.sendErrorMessage(msg.channel, `User not found`);
|
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;
|
let mod = msg.member;
|
||||||
if (args.mod) {
|
if (args.mod) {
|
||||||
if (!this.hasPermission("can_act_as_other", { message: msg })) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1265,11 +1265,11 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
|
||||||
return;
|
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;
|
let mod = msg.member;
|
||||||
if (args.mod) {
|
if (args.mod) {
|
||||||
if (!this.hasPermission("can_act_as_other", { message: msg })) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1416,11 +1416,11 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
|
||||||
return;
|
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;
|
let mod = msg.member;
|
||||||
if (args.mod) {
|
if (args.mod) {
|
||||||
if (!this.hasPermission("can_act_as_other", { message: msg })) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1545,9 +1545,9 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
|
||||||
|
|
||||||
if (!args.hidden && hiddenCases.length) {
|
if (!args.hidden && hiddenCases.length) {
|
||||||
if (hiddenCases.length === 1) {
|
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 {
|
} 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" }],
|
options: [{ name: "mod", type: "Member" }],
|
||||||
extra: {
|
extra: {
|
||||||
info: {
|
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(
|
msg.channel.createMessage(
|
||||||
trimLines(`
|
trimLines(`
|
||||||
<@!${msg.author.id}> You can now specify an embed's content directly at the end of the command:
|
<@!${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\`
|
\`${prefix}post_embed -title "Some title" content goes here\`
|
||||||
The \`--content\` option will soon be removed in favor of this.
|
The \`-content\` option will soon be removed in favor of this.
|
||||||
`),
|
`),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -440,8 +440,8 @@ export class PostPlugin extends ZeppelinPlugin<TConfigSchema> {
|
||||||
msg.channel.createMessage(
|
msg.channel.createMessage(
|
||||||
trimLines(`
|
trimLines(`
|
||||||
<@!${msg.author.id}> You can now specify an embed's content directly at the end of the command:
|
<@!${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\`
|
\`${prefix}edit_embed -title "Some title" content goes here\`
|
||||||
The \`--content\` option will soon be removed in favor of this.
|
The \`-content\` option will soon be removed in favor of this.
|
||||||
`),
|
`),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue