mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 04:25:01 +00:00
Type fixes for djs
This commit is contained in:
parent
653d6c1dc2
commit
0822fc15e5
130 changed files with 8877 additions and 411 deletions
|
@ -71,7 +71,7 @@ export const CasesModCmd = modActionsCmd({
|
|||
],
|
||||
};
|
||||
|
||||
return { embed };
|
||||
return { embeds: [embed] };
|
||||
},
|
||||
{
|
||||
limitToUserId: msg.author.id,
|
||||
|
|
|
@ -12,13 +12,13 @@ import { modActionsCmd } from "../types";
|
|||
const opts = {
|
||||
expand: ct.bool({ option: true, isSwitch: true, shortcut: "e" }),
|
||||
hidden: ct.bool({ option: true, isSwitch: true, shortcut: "h" }),
|
||||
reverseFilters: ct.switchOption({ shortcut: "r" }),
|
||||
notes: ct.switchOption({ shortcut: "n" }),
|
||||
warns: ct.switchOption({ shortcut: "w" }),
|
||||
mutes: ct.switchOption({ shortcut: "m" }),
|
||||
unmutes: ct.switchOption({ shortcut: "um" }),
|
||||
bans: ct.switchOption({ shortcut: "b" }),
|
||||
unbans: ct.switchOption({ shortcut: "ub" }),
|
||||
reverseFilters: ct.switchOption({ def: false, shortcut: "r" }),
|
||||
notes: ct.switchOption({ def: false, shortcut: "n" }),
|
||||
warns: ct.switchOption({ def: false, shortcut: "w" }),
|
||||
mutes: ct.switchOption({ def: false, shortcut: "m" }),
|
||||
unmutes: ct.switchOption({ def: false, shortcut: "um" }),
|
||||
bans: ct.switchOption({ def: false, shortcut: "b" }),
|
||||
unbans: ct.switchOption({ def: false, shortcut: "ub" }),
|
||||
};
|
||||
|
||||
export const CasesUserCmd = modActionsCmd({
|
||||
|
@ -127,7 +127,7 @@ export const CasesUserCmd = modActionsCmd({
|
|||
],
|
||||
};
|
||||
|
||||
msg.channel.send({ embed });
|
||||
msg.channel.send({ embeds: [embed] });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ export const DeleteCaseCmd = modActionsCmd({
|
|||
signature: {
|
||||
caseNumber: ct.number({ rest: true }),
|
||||
|
||||
force: ct.switchOption({ shortcut: "f" }),
|
||||
force: ct.switchOption({ def: false, shortcut: "f" }),
|
||||
},
|
||||
|
||||
async run({ pluginData, message, args }) {
|
||||
|
@ -49,8 +49,8 @@ export const DeleteCaseCmd = modActionsCmd({
|
|||
const cases = pluginData.getPlugin(CasesPlugin);
|
||||
const embedContent = await cases.getCaseEmbed(theCase);
|
||||
message.channel.send({
|
||||
...embedContent,
|
||||
content: "Delete the following case? Answer 'Yes' to continue, 'No' to cancel.",
|
||||
embed: embedContent.embed,
|
||||
});
|
||||
|
||||
const reply = await helpers.waitForReply(
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import { Snowflake } from "discord.js";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { CaseTypes } from "../../../data/CaseTypes";
|
||||
import { LogType } from "../../../data/LogType";
|
||||
|
@ -66,7 +67,7 @@ export const ForcebanCmd = modActionsCmd({
|
|||
|
||||
try {
|
||||
// FIXME: Use banUserId()?
|
||||
await pluginData.guild.bans.create(user.id, {
|
||||
await pluginData.guild.bans.create(user.id as Snowflake, {
|
||||
days: 1,
|
||||
reason: reason != null ? encodeURIComponent(reason) : undefined,
|
||||
});
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import { Snowflake } from "discord.js";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { CaseTypes } from "../../../data/CaseTypes";
|
||||
import { LogType } from "../../../data/LogType";
|
||||
|
@ -49,7 +50,7 @@ export const UnbanCmd = modActionsCmd({
|
|||
|
||||
try {
|
||||
ignoreEvent(pluginData, IgnoredEventType.Unban, user.id);
|
||||
await pluginData.guild.bans.remove(user.id, reason != null ? encodeURIComponent(reason) : undefined);
|
||||
await pluginData.guild.bans.remove(user.id as Snowflake, reason != null ? encodeURIComponent(reason) : undefined);
|
||||
} catch {
|
||||
sendErrorMessage(pluginData, msg.channel, "Failed to unban member; are you sure they're banned?");
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue