Bot now connects, lint fixes
This commit is contained in:
parent
d0a1beb809
commit
edcfd2333f
16 changed files with 29 additions and 24 deletions
|
@ -26,12 +26,13 @@ export const SetSlowmodeAction = automodAction({
|
|||
continue;
|
||||
}
|
||||
|
||||
let channelsToSlowmode: TextChannel[] = [];
|
||||
const channelsToSlowmode: TextChannel[] = [];
|
||||
if (channel.type === ChannelTypeStrings.CATEGORY) {
|
||||
// Find all text channels within the category
|
||||
for (const ch of pluginData.guild.channels.cache.values()) {
|
||||
if (ch.parentID === channel.id && ch.type === ChannelTypeStrings.TEXT)
|
||||
if (ch.parentID === channel.id && ch.type === ChannelTypeStrings.TEXT) {
|
||||
channelsToSlowmode.push(ch as TextChannel);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
channelsToSlowmode.push(channel as TextChannel);
|
||||
|
|
|
@ -21,7 +21,7 @@ export async function postToCaseLogChannel(
|
|||
|
||||
let result;
|
||||
try {
|
||||
if (file != undefined) {
|
||||
if (file != null) {
|
||||
content.files = file;
|
||||
}
|
||||
result = await caseLogChannel.send({ ...content, split: false });
|
||||
|
|
|
@ -14,8 +14,8 @@ export async function censorMessage(
|
|||
pluginData.state.serverLogs.ignoreLog(LogType.MESSAGE_DELETE, savedMessage.id);
|
||||
|
||||
try {
|
||||
const channel = pluginData.guild.channels.resolve(savedMessage.channel_id) as TextChannel;
|
||||
await channel.messages.delete(savedMessage.id);
|
||||
const resolvedChannel = pluginData.guild.channels.resolve(savedMessage.channel_id) as TextChannel;
|
||||
await resolvedChannel.messages.delete(savedMessage.id);
|
||||
} catch {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ function updateGuildInfo(pluginData: GuildPluginData<GuildInfoSaverPluginType>)
|
|||
pluginData.state.allowedGuilds.updateInfo(
|
||||
pluginData.guild.id,
|
||||
pluginData.guild.name,
|
||||
pluginData.guild.iconURL,
|
||||
pluginData.guild.iconURL(),
|
||||
pluginData.guild.ownerID,
|
||||
);
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ export const UnmuteCmd = modActionsCmd({
|
|||
} else {
|
||||
// Ask the mod if we should upgrade to a forceunmute as the user is not on the server
|
||||
const notOnServerMsg = await msg.channel.send("User not found on the server, forceunmute instead?");
|
||||
const reply = false; //await waitForReaction(pluginData.client, notOnServerMsg, ["✅", "❌"], msg.author.id); FIXME waiting on waitForButton
|
||||
const reply = false; // await waitForReaction(pluginData.client, notOnServerMsg, ["✅", "❌"], msg.author.id); FIXME waiting on waitForButton
|
||||
|
||||
notOnServerMsg.delete().catch(noop);
|
||||
if (!reply /*|| reply.name === "❌"*/) {
|
||||
|
|
|
@ -73,7 +73,7 @@ export const WarnCmd = modActionsCmd({
|
|||
config.warn_notify_message.replace("{priorWarnings}", `${priorWarnAmount}`),
|
||||
);
|
||||
|
||||
const reply = false; //await waitForReaction(pluginData.client, tooManyWarningsMsg, ["✅", "❌"], msg.author.id); FIXME waiting on waitForButton
|
||||
const reply = false; // await waitForReaction(pluginData.client, tooManyWarningsMsg, ["✅", "❌"], msg.author.id); FIXME waiting on waitForButton
|
||||
tooManyWarningsMsg.delete();
|
||||
if (!reply /*|| reply.name === "❌"*/) {
|
||||
msg.channel.send(errorMessage("Warn cancelled by moderator"));
|
||||
|
|
|
@ -46,7 +46,7 @@ export async function warnMember(
|
|||
const failedMsg = await warnOptions.retryPromptChannel.send(
|
||||
"Failed to message the user. Log the warning anyway?",
|
||||
);
|
||||
const reply = false; //await waitForReaction(pluginData.client, failedMsg, ["✅", "❌"]); FIXME waiting on waitForButton
|
||||
const reply = false; // await waitForReaction(pluginData.client, failedMsg, ["✅", "❌"]); FIXME waiting on waitForButton
|
||||
failedMsg.delete();
|
||||
if (!reply /*|| reply.name === "❌"*/) {
|
||||
return {
|
||||
|
|
|
@ -27,7 +27,7 @@ export const LoadDataEvt = persistEvt({
|
|||
return;
|
||||
}
|
||||
|
||||
let toRestore: GuildMemberEditData = {};
|
||||
const toRestore: GuildMemberEditData = {};
|
||||
const config = await pluginData.config.getForMember(member);
|
||||
const restoredData: string[] = [];
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ export const AboutCmd = utilityCmd({
|
|||
version = "?";
|
||||
}
|
||||
|
||||
//const shard = pluginData.client.shards.get(pluginData.client.guildShardMap[pluginData.guild.id])!; FIXME Sharding stuff
|
||||
// const shard = pluginData.client.shards.get(pluginData.client.guildShardMap[pluginData.guild.id])!; FIXME Sharding stuff
|
||||
|
||||
const lastReload = humanizeDuration(Date.now() - pluginData.state.lastReload, {
|
||||
largest: 2,
|
||||
|
|
|
@ -309,7 +309,7 @@ async function performMemberSearch(
|
|||
|
||||
const execRegExp = getOptimizedRegExpRunner(pluginData, isSafeRegex);
|
||||
|
||||
/** FIXME if we ever get the intent for this again
|
||||
/* FIXME if we ever get the intent for this again
|
||||
if (args["status-search"]) {
|
||||
matchingMembers = await asyncFilter(matchingMembers, async member => {
|
||||
if (member.game) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue