mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 20:35:02 +00:00
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,14 +1,14 @@
|
|||
import { PluginOptions } from "knub";
|
||||
import { ConfigSchema, defaultStarboardOpts, StarboardPluginType } from "./types";
|
||||
import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint";
|
||||
import { trimPluginDescription } from "../../utils";
|
||||
import { GuildSavedMessages } from "../../data/GuildSavedMessages";
|
||||
import { GuildStarboardMessages } from "../../data/GuildStarboardMessages";
|
||||
import { GuildStarboardReactions } from "../../data/GuildStarboardReactions";
|
||||
import { onMessageDelete } from "./util/onMessageDelete";
|
||||
import { trimPluginDescription } from "../../utils";
|
||||
import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint";
|
||||
import { MigratePinsCmd } from "./commands/MigratePinsCmd";
|
||||
import { StarboardReactionAddEvt } from "./events/StarboardReactionAddEvt";
|
||||
import { StarboardReactionRemoveEvt, StarboardReactionRemoveAllEvt } from "./events/StarboardReactionRemoveEvts";
|
||||
import { StarboardReactionRemoveAllEvt, StarboardReactionRemoveEvt } from "./events/StarboardReactionRemoveEvts";
|
||||
import { ConfigSchema, defaultStarboardOpts, StarboardPluginType } from "./types";
|
||||
import { onMessageDelete } from "./util/onMessageDelete";
|
||||
|
||||
const defaultOptions: PluginOptions<StarboardPluginType> = {
|
||||
config: {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { starboardCmd } from "../types";
|
||||
import { sendSuccessMessage, sendErrorMessage } from "../../../pluginUtils";
|
||||
|
||||
import { saveMessageToStarboard } from "../util/saveMessageToStarboard";
|
||||
import { TextChannel } from "discord.js";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
||||
import { starboardCmd } from "../types";
|
||||
import { saveMessageToStarboard } from "../util/saveMessageToStarboard";
|
||||
|
||||
|
||||
export const MigratePinsCmd = starboardCmd({
|
||||
trigger: "starboard migrate_pins",
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { Message, TextChannel } from "discord.js";
|
||||
import { noop, resolveMember } from "../../../utils";
|
||||
import { allStarboardsLock } from "../../../utils/lockNameHelpers";
|
||||
import { starboardEvt } from "../types";
|
||||
|
||||
import { UnknownUser, resolveMember, noop, resolveUser } from "../../../utils";
|
||||
import { saveMessageToStarboard } from "../util/saveMessageToStarboard";
|
||||
import { updateStarboardMessageStarCount } from "../util/updateStarboardMessageStarCount";
|
||||
import { allStarboardsLock } from "../../../utils/lockNameHelpers";
|
||||
import { Message, TextChannel } from "discord.js";
|
||||
|
||||
|
||||
export const StarboardReactionAddEvt = starboardEvt({
|
||||
event: "messageReactionAdd",
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import * as t from "io-ts";
|
||||
import { BasePluginType, typedGuildCommand, typedGuildEventListener } from "knub";
|
||||
import { tNullable, tDeepPartial } from "../../utils";
|
||||
import { GuildSavedMessages } from "../../data/GuildSavedMessages";
|
||||
import { GuildStarboardMessages } from "../../data/GuildStarboardMessages";
|
||||
import { GuildStarboardReactions } from "../../data/GuildStarboardReactions";
|
||||
import { tDeepPartial, tNullable } from "../../utils";
|
||||
|
||||
const StarboardOpts = t.type({
|
||||
channel_id: t.string,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { EmbedWith, EMPTY_CHAR, messageLink } from "../../../utils";
|
||||
|
||||
import { GuildChannel, Message } from "discord.js";
|
||||
import path from "path";
|
||||
import { Message, GuildChannel } from "discord.js";
|
||||
import { EmbedWith, EMPTY_CHAR } from "../../../utils";
|
||||
|
||||
|
||||
const imageAttachmentExtensions = ["jpeg", "jpg", "png", "gif", "webp"];
|
||||
const audioAttachmentExtensions = ["wav", "mp3", "m4a"];
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Message, EmbedField } from "discord.js";
|
||||
import { EmbedField, Message } from "discord.js";
|
||||
import { EMPTY_CHAR, messageLink } from "../../../utils";
|
||||
import { TStarboardOpts } from "../types";
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { SavedMessage } from "../../../data/entities/SavedMessage";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { SavedMessage } from "../../../data/entities/SavedMessage";
|
||||
import { StarboardPluginType } from "../types";
|
||||
import { removeMessageFromStarboard } from "./removeMessageFromStarboard";
|
||||
import { removeMessageFromStarboardMessages } from "./removeMessageFromStarboardMessages";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { PartialConfigSchema, defaultStarboardOpts } from "../types";
|
||||
import * as t from "io-ts";
|
||||
import { defaultStarboardOpts, PartialConfigSchema } from "../types";
|
||||
|
||||
export function preprocessStaticConfig(config: t.TypeOf<typeof PartialConfigSchema>) {
|
||||
if (config.boards) {
|
||||
|
|
|
@ -1,12 +1,9 @@
|
|||
import { Message, TextChannel } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { StarboardPluginType, TStarboardOpts } from "../types";
|
||||
|
||||
import moment from "moment-timezone";
|
||||
import { EmbedWith, EMPTY_CHAR, messageLink } from "../../../utils";
|
||||
import path from "path";
|
||||
import { createStarboardEmbedFromMessage } from "./createStarboardEmbedFromMessage";
|
||||
import { createStarboardPseudoFooterForMessage } from "./createStarboardPseudoFooterForMessage";
|
||||
import { Message, TextChannel } from "discord.js";
|
||||
|
||||
|
||||
export async function saveMessageToStarboard(
|
||||
pluginData: GuildPluginData<StarboardPluginType>,
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
import { noop } from "../../../utils";
|
||||
import { createStarboardPseudoFooterForMessage } from "./createStarboardPseudoFooterForMessage";
|
||||
import { TStarboardOpts } from "../types";
|
||||
import Timeout = NodeJS.Timeout;
|
||||
import { Message } from "discord.js";
|
||||
import { TStarboardOpts } from "../types";
|
||||
import { createStarboardPseudoFooterForMessage } from "./createStarboardPseudoFooterForMessage";
|
||||
import Timeout = NodeJS.Timeout;
|
||||
|
||||
const DEBOUNCE_DELAY = 1000;
|
||||
const debouncedUpdates: Record<string, Timeout> = {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue