Organise all imports, make Mutes depend on Logs
This commit is contained in:
parent
a94e7593ec
commit
6ac9d2f2a2
437 changed files with 1912 additions and 2027 deletions
|
@ -1,17 +1,17 @@
|
|||
import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint";
|
||||
import { PluginOptions } from "knub";
|
||||
import { ConfigSchema, ReactionRolesPluginType } from "./types";
|
||||
import { GuildReactionRoles } from "../../data/GuildReactionRoles";
|
||||
import { GuildSavedMessages } from "../../data/GuildSavedMessages";
|
||||
import { Queue } from "../../Queue";
|
||||
import { autoRefreshLoop } from "./util/autoRefreshLoop";
|
||||
import { InitReactionRolesCmd } from "./commands/InitReactionRolesCmd";
|
||||
import { RefreshReactionRolesCmd } from "./commands/RefreshReactionRolesCmd";
|
||||
import { ClearReactionRolesCmd } from "./commands/ClearReactionRolesCmd";
|
||||
import { AddReactionRoleEvt } from "./events/AddReactionRoleEvt";
|
||||
import { LogsPlugin } from "../Logs/LogsPlugin";
|
||||
import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint";
|
||||
import { ClearReactionRolesCmd } from "./commands/ClearReactionRolesCmd";
|
||||
import { InitReactionRolesCmd } from "./commands/InitReactionRolesCmd";
|
||||
import { PostButtonRolesCmd } from "./commands/PostButtonRolesCmd";
|
||||
import { RefreshReactionRolesCmd } from "./commands/RefreshReactionRolesCmd";
|
||||
import { AddReactionRoleEvt } from "./events/AddReactionRoleEvt";
|
||||
import { ButtonInteractionEvt } from "./events/ButtonInteractionEvt";
|
||||
import { ConfigSchema, ReactionRolesPluginType } from "./types";
|
||||
import { autoRefreshLoop } from "./util/autoRefreshLoop";
|
||||
|
||||
const MIN_AUTO_REFRESH = 1000 * 60 * 15; // 15min minimum, let's not abuse the API
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { reactionRolesCmd } from "../types";
|
||||
import { Message } from "discord.js";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
||||
|
||||
import { isDiscordRESTError } from "../../../utils";
|
||||
import { Message } from "discord.js";
|
||||
import { reactionRolesCmd } from "../types";
|
||||
|
||||
|
||||
export const ClearReactionRolesCmd = reactionRolesCmd({
|
||||
trigger: "reaction_roles clear",
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { reactionRolesCmd, TReactionRolePair } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
||||
import { canUseEmoji, isDiscordRESTError, isValidEmoji, noop, trimPluginDescription } from "../../../utils";
|
||||
import { applyReactionRoleReactionsToMessage } from "../util/applyReactionRoleReactionsToMessage";
|
||||
import { canReadChannel } from "../../../utils/canReadChannel";
|
||||
import { reactionRolesCmd, TReactionRolePair } from "../types";
|
||||
import { applyReactionRoleReactionsToMessage } from "../util/applyReactionRoleReactionsToMessage";
|
||||
|
||||
const CLEAR_ROLES_EMOJI = "❌";
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { reactionRolesCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { MessageActionRow, MessageButton, TextChannel } from "discord.js";
|
||||
import { sendErrorMessage, sendSuccessMessage } from "src/pluginUtils";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { reactionRolesCmd } from "../types";
|
||||
import { ButtonMenuActions } from "../util/buttonMenuActions";
|
||||
|
||||
export const PostButtonRolesCmd = reactionRolesCmd({
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { reactionRolesCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
||||
import { reactionRolesCmd } from "../types";
|
||||
import { refreshReactionRoles } from "../util/refreshReactionRoles";
|
||||
|
||||
export const RefreshReactionRolesCmd = reactionRolesCmd({
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
import { reactionRolesEvt } from "../types";
|
||||
import { Message } from "discord.js";
|
||||
import { noop, resolveMember, sleep } from "../../../utils";
|
||||
import { reactionRolesEvt } from "../types";
|
||||
import { addMemberPendingRoleChange } from "../util/addMemberPendingRoleChange";
|
||||
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
import { LogType } from "../../../data/LogType";
|
||||
import { Message } from "discord.js";
|
||||
|
||||
const CLEAR_ROLES_EMOJI = "❌";
|
||||
|
||||
|
|
|
@ -1,14 +1,10 @@
|
|||
import {
|
||||
Interaction,
|
||||
MessageActionRow,
|
||||
MessageButton,
|
||||
MessageComponentInteraction,
|
||||
MessageComponentInteractionCollector,
|
||||
TextChannel,
|
||||
MessageComponentInteraction
|
||||
} from "discord.js";
|
||||
import { LogType } from "src/data/LogType";
|
||||
import { logger } from "src/logger";
|
||||
import { pluginInfo } from "src/plugins/Automod/info";
|
||||
import { LogsPlugin } from "src/plugins/Logs/LogsPlugin";
|
||||
import { reactionRolesEvt } from "../types";
|
||||
import { ButtonMenuActions } from "../util/buttonMenuActions";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import * as t from "io-ts";
|
||||
import { BasePluginType, typedGuildEventListener, typedGuildCommand } from "knub";
|
||||
import { GuildSavedMessages } from "../../data/GuildSavedMessages";
|
||||
import { BasePluginType, typedGuildCommand, typedGuildEventListener } from "knub";
|
||||
import { GuildReactionRoles } from "../../data/GuildReactionRoles";
|
||||
import { GuildSavedMessages } from "../../data/GuildSavedMessages";
|
||||
import { Queue } from "../../Queue";
|
||||
|
||||
const ButtonOpts = t.type({
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { GuildPluginData } from "knub";
|
||||
import { ReactionRolesPluginType, RoleChangeMode, PendingMemberRoleChanges } from "../types";
|
||||
import { resolveMember } from "../../../utils";
|
||||
import { logger } from "../../../logger";
|
||||
import { resolveMember } from "../../../utils";
|
||||
import { memberRolesLock } from "../../../utils/lockNameHelpers";
|
||||
import { PendingMemberRoleChanges, ReactionRolesPluginType, RoleChangeMode } from "../types";
|
||||
|
||||
const ROLE_CHANGE_BATCH_DEBOUNCE_TIME = 1500;
|
||||
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
import { GuildPluginData } from "knub";
|
||||
import { ReactionRolesPluginType } from "../types";
|
||||
import { ReactionRole } from "../../../data/entities/ReactionRole";
|
||||
|
||||
import { isDiscordRESTError, sleep, isSnowflake } from "../../../utils";
|
||||
import { logger } from "../../../logger";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
import { LogType } from "../../../data/LogType";
|
||||
import { TextChannel } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { ReactionRole } from "../../../data/entities/ReactionRole";
|
||||
import { LogType } from "../../../data/LogType";
|
||||
import { isDiscordRESTError, sleep } from "../../../utils";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
import { ReactionRolesPluginType } from "../types";
|
||||
|
||||
|
||||
const CLEAR_ROLES_EMOJI = "❌";
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { ReactionRolesPluginType } from "../types";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { ReactionRolesPluginType } from "../types";
|
||||
import { applyReactionRoleReactionsToMessage } from "./applyReactionRoleReactionsToMessage";
|
||||
|
||||
export async function refreshReactionRoles(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue