mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-07-08 03:27:20 +00:00
chore: esm imports
This will make merging this into 'next' much easier.
This commit is contained in:
parent
1f0c7a4349
commit
45e3fe2ef0
798 changed files with 3633 additions and 3633 deletions
|
@ -1,48 +1,48 @@
|
|||
import { Snowflake } from "discord.js";
|
||||
import { PluginOptions, guildPlugin } from "knub";
|
||||
import { GuildArchives } from "../../data/GuildArchives";
|
||||
import { GuildCases } from "../../data/GuildCases";
|
||||
import { GuildLogs } from "../../data/GuildLogs";
|
||||
import { GuildSavedMessages } from "../../data/GuildSavedMessages";
|
||||
import { Supporters } from "../../data/Supporters";
|
||||
import { makePublicFn } from "../../pluginUtils";
|
||||
import { discardRegExpRunner, getRegExpRunner } from "../../regExpRunners";
|
||||
import { CommonPlugin } from "../Common/CommonPlugin";
|
||||
import { LogsPlugin } from "../Logs/LogsPlugin";
|
||||
import { ModActionsPlugin } from "../ModActions/ModActionsPlugin";
|
||||
import { TimeAndDatePlugin } from "../TimeAndDate/TimeAndDatePlugin";
|
||||
import { AboutCmd } from "./commands/AboutCmd";
|
||||
import { AvatarCmd } from "./commands/AvatarCmd";
|
||||
import { BanSearchCmd } from "./commands/BanSearchCmd";
|
||||
import { ChannelInfoCmd } from "./commands/ChannelInfoCmd";
|
||||
import { CleanCmd, cleanCmd } from "./commands/CleanCmd";
|
||||
import { ContextCmd } from "./commands/ContextCmd";
|
||||
import { EmojiInfoCmd } from "./commands/EmojiInfoCmd";
|
||||
import { HelpCmd } from "./commands/HelpCmd";
|
||||
import { InfoCmd } from "./commands/InfoCmd";
|
||||
import { InviteInfoCmd } from "./commands/InviteInfoCmd";
|
||||
import { JumboCmd } from "./commands/JumboCmd";
|
||||
import { LevelCmd } from "./commands/LevelCmd";
|
||||
import { MessageInfoCmd } from "./commands/MessageInfoCmd";
|
||||
import { NicknameCmd } from "./commands/NicknameCmd";
|
||||
import { NicknameResetCmd } from "./commands/NicknameResetCmd";
|
||||
import { PingCmd } from "./commands/PingCmd";
|
||||
import { ReloadGuildCmd } from "./commands/ReloadGuildCmd";
|
||||
import { RoleInfoCmd } from "./commands/RoleInfoCmd";
|
||||
import { RolesCmd } from "./commands/RolesCmd";
|
||||
import { SearchCmd } from "./commands/SearchCmd";
|
||||
import { ServerInfoCmd } from "./commands/ServerInfoCmd";
|
||||
import { SnowflakeInfoCmd } from "./commands/SnowflakeInfoCmd";
|
||||
import { SourceCmd } from "./commands/SourceCmd";
|
||||
import { UserInfoCmd } from "./commands/UserInfoCmd";
|
||||
import { VcdisconnectCmd } from "./commands/VcdisconnectCmd";
|
||||
import { VcmoveAllCmd, VcmoveCmd } from "./commands/VcmoveCmd";
|
||||
import { AutoJoinThreadEvt, AutoJoinThreadSyncEvt } from "./events/AutoJoinThreadEvt";
|
||||
import { getUserInfoEmbed } from "./functions/getUserInfoEmbed";
|
||||
import { hasPermission } from "./functions/hasPermission";
|
||||
import { activeReloads } from "./guildReloads";
|
||||
import { refreshMembersIfNeeded } from "./refreshMembers";
|
||||
import { UtilityPluginType, zUtilityConfig } from "./types";
|
||||
import { GuildArchives } from "../../data/GuildArchives.js";
|
||||
import { GuildCases } from "../../data/GuildCases.js";
|
||||
import { GuildLogs } from "../../data/GuildLogs.js";
|
||||
import { GuildSavedMessages } from "../../data/GuildSavedMessages.js";
|
||||
import { Supporters } from "../../data/Supporters.js";
|
||||
import { makePublicFn } from "../../pluginUtils.js";
|
||||
import { discardRegExpRunner, getRegExpRunner } from "../../regExpRunners.js";
|
||||
import { CommonPlugin } from "../Common/CommonPlugin.js";
|
||||
import { LogsPlugin } from "../Logs/LogsPlugin.js";
|
||||
import { ModActionsPlugin } from "../ModActions/ModActionsPlugin.js";
|
||||
import { TimeAndDatePlugin } from "../TimeAndDate/TimeAndDatePlugin.js";
|
||||
import { AboutCmd } from "./commands/AboutCmd.js";
|
||||
import { AvatarCmd } from "./commands/AvatarCmd.js";
|
||||
import { BanSearchCmd } from "./commands/BanSearchCmd.js";
|
||||
import { ChannelInfoCmd } from "./commands/ChannelInfoCmd.js";
|
||||
import { CleanCmd, cleanCmd } from "./commands/CleanCmd.js";
|
||||
import { ContextCmd } from "./commands/ContextCmd.js";
|
||||
import { EmojiInfoCmd } from "./commands/EmojiInfoCmd.js";
|
||||
import { HelpCmd } from "./commands/HelpCmd.js";
|
||||
import { InfoCmd } from "./commands/InfoCmd.js";
|
||||
import { InviteInfoCmd } from "./commands/InviteInfoCmd.js";
|
||||
import { JumboCmd } from "./commands/JumboCmd.js";
|
||||
import { LevelCmd } from "./commands/LevelCmd.js";
|
||||
import { MessageInfoCmd } from "./commands/MessageInfoCmd.js";
|
||||
import { NicknameCmd } from "./commands/NicknameCmd.js";
|
||||
import { NicknameResetCmd } from "./commands/NicknameResetCmd.js";
|
||||
import { PingCmd } from "./commands/PingCmd.js";
|
||||
import { ReloadGuildCmd } from "./commands/ReloadGuildCmd.js";
|
||||
import { RoleInfoCmd } from "./commands/RoleInfoCmd.js";
|
||||
import { RolesCmd } from "./commands/RolesCmd.js";
|
||||
import { SearchCmd } from "./commands/SearchCmd.js";
|
||||
import { ServerInfoCmd } from "./commands/ServerInfoCmd.js";
|
||||
import { SnowflakeInfoCmd } from "./commands/SnowflakeInfoCmd.js";
|
||||
import { SourceCmd } from "./commands/SourceCmd.js";
|
||||
import { UserInfoCmd } from "./commands/UserInfoCmd.js";
|
||||
import { VcdisconnectCmd } from "./commands/VcdisconnectCmd.js";
|
||||
import { VcmoveAllCmd, VcmoveCmd } from "./commands/VcmoveCmd.js";
|
||||
import { AutoJoinThreadEvt, AutoJoinThreadSyncEvt } from "./events/AutoJoinThreadEvt.js";
|
||||
import { getUserInfoEmbed } from "./functions/getUserInfoEmbed.js";
|
||||
import { hasPermission } from "./functions/hasPermission.js";
|
||||
import { activeReloads } from "./guildReloads.js";
|
||||
import { refreshMembersIfNeeded } from "./refreshMembers.js";
|
||||
import { UtilityPluginType, zUtilityConfig } from "./types.js";
|
||||
|
||||
const defaultOptions: PluginOptions<UtilityPluginType> = {
|
||||
config: {
|
||||
|
|
|
@ -3,11 +3,11 @@ import humanizeDuration from "humanize-duration";
|
|||
import LCL from "last-commit-log";
|
||||
import { shuffle } from "lodash";
|
||||
import moment from "moment-timezone";
|
||||
import { rootDir } from "../../../paths";
|
||||
import { getCurrentUptime } from "../../../uptime";
|
||||
import { resolveMember, sorter } from "../../../utils";
|
||||
import { TimeAndDatePlugin } from "../../TimeAndDate/TimeAndDatePlugin";
|
||||
import { utilityCmd } from "../types";
|
||||
import { rootDir } from "../../../paths.js";
|
||||
import { getCurrentUptime } from "../../../uptime.js";
|
||||
import { resolveMember, sorter } from "../../../utils.js";
|
||||
import { TimeAndDatePlugin } from "../../TimeAndDate/TimeAndDatePlugin.js";
|
||||
import { utilityCmd } from "../types.js";
|
||||
|
||||
export const AboutCmd = utilityCmd({
|
||||
trigger: "about",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { APIEmbed, ImageFormat } from "discord.js";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { UnknownUser, renderUsername } from "../../../utils";
|
||||
import { utilityCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes.js";
|
||||
import { UnknownUser, renderUsername } from "../../../utils.js";
|
||||
import { utilityCmd } from "../types.js";
|
||||
|
||||
export const AvatarCmd = utilityCmd({
|
||||
trigger: ["avatar", "av"],
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { archiveSearch, displaySearch, SearchType } from "../search";
|
||||
import { utilityCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes.js";
|
||||
import { archiveSearch, displaySearch, SearchType } from "../search.js";
|
||||
import { utilityCmd } from "../types.js";
|
||||
|
||||
// Separate from BanSearchCmd to avoid a circular reference from ./search.ts
|
||||
export const banSearchSignature = {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { getChannelInfoEmbed } from "../functions/getChannelInfoEmbed";
|
||||
import { utilityCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes.js";
|
||||
import { getChannelInfoEmbed } from "../functions/getChannelInfoEmbed.js";
|
||||
import { utilityCmd } from "../types.js";
|
||||
|
||||
export const ChannelInfoCmd = utilityCmd({
|
||||
trigger: ["channel", "channelinfo"],
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
import { Message, ModalSubmitInteraction, Snowflake, TextChannel, User } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { allowTimeout } from "../../../RegExpRunner";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { LogType } from "../../../data/LogType";
|
||||
import { SavedMessage } from "../../../data/entities/SavedMessage";
|
||||
import { humanizeDurationShort } from "../../../humanizeDurationShort";
|
||||
import { getBaseUrl } from "../../../pluginUtils";
|
||||
import { ModActionsPlugin } from "../../../plugins/ModActions/ModActionsPlugin";
|
||||
import { DAYS, SECONDS, chunkArray, getInviteCodesInString, noop } from "../../../utils";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
import { UtilityPluginType, utilityCmd } from "../types";
|
||||
import { allowTimeout } from "../../../RegExpRunner.js";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes.js";
|
||||
import { LogType } from "../../../data/LogType.js";
|
||||
import { SavedMessage } from "../../../data/entities/SavedMessage.js";
|
||||
import { humanizeDurationShort } from "../../../humanizeDurationShort.js";
|
||||
import { getBaseUrl } from "../../../pluginUtils.js";
|
||||
import { ModActionsPlugin } from "../../../plugins/ModActions/ModActionsPlugin.js";
|
||||
import { DAYS, SECONDS, chunkArray, getInviteCodesInString, noop } from "../../../utils.js";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin.js";
|
||||
import { UtilityPluginType, utilityCmd } from "../types.js";
|
||||
|
||||
const MAX_CLEAN_COUNT = 300;
|
||||
const MAX_CLEAN_TIME = 1 * DAYS;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { Snowflake, TextChannel } from "discord.js";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { messageLink } from "../../../utils";
|
||||
import { canReadChannel } from "../../../utils/canReadChannel";
|
||||
import { utilityCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes.js";
|
||||
import { messageLink } from "../../../utils.js";
|
||||
import { canReadChannel } from "../../../utils/canReadChannel.js";
|
||||
import { utilityCmd } from "../types.js";
|
||||
|
||||
export const ContextCmd = utilityCmd({
|
||||
trigger: "context",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { getCustomEmojiId } from "../functions/getCustomEmojiId";
|
||||
import { getEmojiInfoEmbed } from "../functions/getEmojiInfoEmbed";
|
||||
import { utilityCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes.js";
|
||||
import { getCustomEmojiId } from "../functions/getCustomEmojiId.js";
|
||||
import { getEmojiInfoEmbed } from "../functions/getEmojiInfoEmbed.js";
|
||||
import { utilityCmd } from "../types.js";
|
||||
|
||||
export const EmojiInfoCmd = utilityCmd({
|
||||
trigger: ["emoji", "emojiinfo"],
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { LoadedGuildPlugin, PluginCommandDefinition } from "knub";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { createChunkedMessage } from "../../../utils";
|
||||
import { utilityCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes.js";
|
||||
import { createChunkedMessage } from "../../../utils.js";
|
||||
import { utilityCmd } from "../types.js";
|
||||
|
||||
export const HelpCmd = utilityCmd({
|
||||
trigger: "help",
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
import { Snowflake } from "discord.js";
|
||||
import { getChannelId, getRoleId } from "knub/helpers";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { isValidSnowflake, noop, parseInviteCodeInput, resolveInvite, resolveUser } from "../../../utils";
|
||||
import { canReadChannel } from "../../../utils/canReadChannel";
|
||||
import { resolveMessageTarget } from "../../../utils/resolveMessageTarget";
|
||||
import { getChannelInfoEmbed } from "../functions/getChannelInfoEmbed";
|
||||
import { getCustomEmojiId } from "../functions/getCustomEmojiId";
|
||||
import { getEmojiInfoEmbed } from "../functions/getEmojiInfoEmbed";
|
||||
import { getGuildPreview } from "../functions/getGuildPreview";
|
||||
import { getInviteInfoEmbed } from "../functions/getInviteInfoEmbed";
|
||||
import { getMessageInfoEmbed } from "../functions/getMessageInfoEmbed";
|
||||
import { getRoleInfoEmbed } from "../functions/getRoleInfoEmbed";
|
||||
import { getServerInfoEmbed } from "../functions/getServerInfoEmbed";
|
||||
import { getSnowflakeInfoEmbed } from "../functions/getSnowflakeInfoEmbed";
|
||||
import { getUserInfoEmbed } from "../functions/getUserInfoEmbed";
|
||||
import { utilityCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes.js";
|
||||
import { isValidSnowflake, noop, parseInviteCodeInput, resolveInvite, resolveUser } from "../../../utils.js";
|
||||
import { canReadChannel } from "../../../utils/canReadChannel.js";
|
||||
import { resolveMessageTarget } from "../../../utils/resolveMessageTarget.js";
|
||||
import { getChannelInfoEmbed } from "../functions/getChannelInfoEmbed.js";
|
||||
import { getCustomEmojiId } from "../functions/getCustomEmojiId.js";
|
||||
import { getEmojiInfoEmbed } from "../functions/getEmojiInfoEmbed.js";
|
||||
import { getGuildPreview } from "../functions/getGuildPreview.js";
|
||||
import { getInviteInfoEmbed } from "../functions/getInviteInfoEmbed.js";
|
||||
import { getMessageInfoEmbed } from "../functions/getMessageInfoEmbed.js";
|
||||
import { getRoleInfoEmbed } from "../functions/getRoleInfoEmbed.js";
|
||||
import { getServerInfoEmbed } from "../functions/getServerInfoEmbed.js";
|
||||
import { getSnowflakeInfoEmbed } from "../functions/getSnowflakeInfoEmbed.js";
|
||||
import { getUserInfoEmbed } from "../functions/getUserInfoEmbed.js";
|
||||
import { utilityCmd } from "../types.js";
|
||||
|
||||
export const InfoCmd = utilityCmd({
|
||||
trigger: "info",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { parseInviteCodeInput } from "../../../utils";
|
||||
import { getInviteInfoEmbed } from "../functions/getInviteInfoEmbed";
|
||||
import { utilityCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes.js";
|
||||
import { parseInviteCodeInput } from "../../../utils.js";
|
||||
import { getInviteInfoEmbed } from "../functions/getInviteInfoEmbed.js";
|
||||
import { utilityCmd } from "../types.js";
|
||||
|
||||
export const InviteInfoCmd = utilityCmd({
|
||||
trigger: ["invite", "inviteinfo"],
|
||||
|
|
|
@ -2,9 +2,9 @@ import photon from "@silvia-odwyer/photon-node";
|
|||
import { AttachmentBuilder } from "discord.js";
|
||||
import fs from "fs";
|
||||
import twemoji from "twemoji";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { downloadFile, isEmoji, SECONDS } from "../../../utils";
|
||||
import { utilityCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes.js";
|
||||
import { downloadFile, isEmoji, SECONDS } from "../../../utils.js";
|
||||
import { utilityCmd } from "../types.js";
|
||||
|
||||
const fsp = fs.promises;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { helpers } from "knub";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { renderUsername } from "../../../utils";
|
||||
import { utilityCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes.js";
|
||||
import { renderUsername } from "../../../utils.js";
|
||||
import { utilityCmd } from "../types.js";
|
||||
|
||||
const { getMemberLevel } = helpers;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { canReadChannel } from "../../../utils/canReadChannel";
|
||||
import { getMessageInfoEmbed } from "../functions/getMessageInfoEmbed";
|
||||
import { utilityCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes.js";
|
||||
import { canReadChannel } from "../../../utils/canReadChannel.js";
|
||||
import { getMessageInfoEmbed } from "../functions/getMessageInfoEmbed.js";
|
||||
import { utilityCmd } from "../types.js";
|
||||
|
||||
export const MessageInfoCmd = utilityCmd({
|
||||
trigger: ["message", "messageinfo"],
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { escapeBold } from "discord.js";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { canActOn } from "../../../pluginUtils";
|
||||
import { errorMessage } from "../../../utils";
|
||||
import { utilityCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes.js";
|
||||
import { canActOn } from "../../../pluginUtils.js";
|
||||
import { errorMessage } from "../../../utils.js";
|
||||
import { utilityCmd } from "../types.js";
|
||||
|
||||
export const NicknameCmd = utilityCmd({
|
||||
trigger: ["nickname", "nick"],
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { canActOn } from "../../../pluginUtils";
|
||||
import { errorMessage } from "../../../utils";
|
||||
import { utilityCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes.js";
|
||||
import { canActOn } from "../../../pluginUtils.js";
|
||||
import { errorMessage } from "../../../utils.js";
|
||||
import { utilityCmd } from "../types.js";
|
||||
|
||||
export const NicknameResetCmd = utilityCmd({
|
||||
trigger: ["nickname reset", "nick reset"],
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Message } from "discord.js";
|
||||
import { performance } from "perf_hooks";
|
||||
import { noop, trimLines } from "../../../utils";
|
||||
import { utilityCmd } from "../types";
|
||||
import { noop, trimLines } from "../../../utils.js";
|
||||
import { utilityCmd } from "../types.js";
|
||||
|
||||
export const PingCmd = utilityCmd({
|
||||
trigger: ["ping", "pong"],
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { TextChannel } from "discord.js";
|
||||
import { activeReloads } from "../guildReloads";
|
||||
import { utilityCmd } from "../types";
|
||||
import { activeReloads } from "../guildReloads.js";
|
||||
import { utilityCmd } from "../types.js";
|
||||
|
||||
export const ReloadGuildCmd = utilityCmd({
|
||||
trigger: "reload_guild",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { getRoleInfoEmbed } from "../functions/getRoleInfoEmbed";
|
||||
import { utilityCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes.js";
|
||||
import { getRoleInfoEmbed } from "../functions/getRoleInfoEmbed.js";
|
||||
import { utilityCmd } from "../types.js";
|
||||
|
||||
export const RoleInfoCmd = utilityCmd({
|
||||
trigger: ["roleinfo"],
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { Role } from "discord.js";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { chunkArray, sorter, trimLines } from "../../../utils";
|
||||
import { refreshMembersIfNeeded } from "../refreshMembers";
|
||||
import { utilityCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes.js";
|
||||
import { chunkArray, sorter, trimLines } from "../../../utils.js";
|
||||
import { refreshMembersIfNeeded } from "../refreshMembers.js";
|
||||
import { utilityCmd } from "../types.js";
|
||||
|
||||
export const RolesCmd = utilityCmd({
|
||||
trigger: "roles",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { archiveSearch, displaySearch, SearchType } from "../search";
|
||||
import { utilityCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes.js";
|
||||
import { archiveSearch, displaySearch, SearchType } from "../search.js";
|
||||
import { utilityCmd } from "../types.js";
|
||||
|
||||
// Separate from SearchCmd to avoid a circular reference from ./search.ts
|
||||
export const searchCmdSignature = {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { getServerInfoEmbed } from "../functions/getServerInfoEmbed";
|
||||
import { utilityCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes.js";
|
||||
import { getServerInfoEmbed } from "../functions/getServerInfoEmbed.js";
|
||||
import { utilityCmd } from "../types.js";
|
||||
|
||||
export const ServerInfoCmd = utilityCmd({
|
||||
trigger: ["server", "serverinfo"],
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { getSnowflakeInfoEmbed } from "../functions/getSnowflakeInfoEmbed";
|
||||
import { utilityCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes.js";
|
||||
import { getSnowflakeInfoEmbed } from "../functions/getSnowflakeInfoEmbed.js";
|
||||
import { utilityCmd } from "../types.js";
|
||||
|
||||
export const SnowflakeInfoCmd = utilityCmd({
|
||||
trigger: ["snowflake", "snowflakeinfo"],
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import moment from "moment-timezone";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { getBaseUrl } from "../../../pluginUtils";
|
||||
import { canReadChannel } from "../../../utils/canReadChannel";
|
||||
import { utilityCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes.js";
|
||||
import { getBaseUrl } from "../../../pluginUtils.js";
|
||||
import { canReadChannel } from "../../../utils/canReadChannel.js";
|
||||
import { utilityCmd } from "../types.js";
|
||||
|
||||
export const SourceCmd = utilityCmd({
|
||||
trigger: "source",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { getUserInfoEmbed } from "../functions/getUserInfoEmbed";
|
||||
import { utilityCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes.js";
|
||||
import { getUserInfoEmbed } from "../functions/getUserInfoEmbed.js";
|
||||
import { utilityCmd } from "../types.js";
|
||||
|
||||
export const UserInfoCmd = utilityCmd({
|
||||
trigger: ["user", "userinfo", "whois"],
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { VoiceChannel } from "discord.js";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { canActOn } from "../../../pluginUtils";
|
||||
import { renderUsername } from "../../../utils";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
import { utilityCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes.js";
|
||||
import { canActOn } from "../../../pluginUtils.js";
|
||||
import { renderUsername } from "../../../utils.js";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin.js";
|
||||
import { utilityCmd } from "../types.js";
|
||||
|
||||
export const VcdisconnectCmd = utilityCmd({
|
||||
trigger: ["vcdisconnect", "vcdisc", "vcdc", "vckick", "vck"],
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { ChannelType, Snowflake, VoiceChannel } from "discord.js";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { canActOn } from "../../../pluginUtils";
|
||||
import { channelMentionRegex, isSnowflake, renderUsername, simpleClosestStringMatch } from "../../../utils";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
import { utilityCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes.js";
|
||||
import { canActOn } from "../../../pluginUtils.js";
|
||||
import { channelMentionRegex, isSnowflake, renderUsername, simpleClosestStringMatch } from "../../../utils.js";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin.js";
|
||||
import { utilityCmd } from "../types.js";
|
||||
|
||||
export const VcmoveCmd = utilityCmd({
|
||||
trigger: "vcmove",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { utilityEvt } from "../types";
|
||||
import { utilityEvt } from "../types.js";
|
||||
|
||||
export const AutoJoinThreadEvt = utilityEvt({
|
||||
event: "threadCreate",
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { APIEmbed, ChannelType, Snowflake, StageChannel, VoiceChannel } from "discord.js";
|
||||
import humanizeDuration from "humanize-duration";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { EmbedWith, MINUTES, formatNumber, preEmbedPadding, trimLines, verboseUserMention } from "../../../utils";
|
||||
import { UtilityPluginType } from "../types";
|
||||
import { EmbedWith, MINUTES, formatNumber, preEmbedPadding, trimLines, verboseUserMention } from "../../../utils.js";
|
||||
import { UtilityPluginType } from "../types.js";
|
||||
|
||||
const TEXT_CHANNEL_ICON =
|
||||
"https://cdn.discordapp.com/attachments/740650744830623756/740656843545772062/text-channel.png";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { APIEmbed } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { EmbedWith, preEmbedPadding, trimLines } from "../../../utils";
|
||||
import { UtilityPluginType } from "../types";
|
||||
import { EmbedWith, preEmbedPadding, trimLines } from "../../../utils.js";
|
||||
import { UtilityPluginType } from "../types.js";
|
||||
|
||||
export async function getEmojiInfoEmbed(
|
||||
pluginData: GuildPluginData<UtilityPluginType>,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Client, GuildPreview, Snowflake } from "discord.js";
|
||||
import { MINUTES, memoize } from "../../../utils";
|
||||
import { MINUTES, memoize } from "../../../utils.js";
|
||||
|
||||
/**
|
||||
* Memoized getGuildPreview
|
||||
|
|
|
@ -11,9 +11,9 @@ import {
|
|||
renderUsername,
|
||||
resolveInvite,
|
||||
trimLines,
|
||||
} from "../../../utils";
|
||||
import { snowflakeToTimestamp } from "../../../utils/snowflakeToTimestamp";
|
||||
import { UtilityPluginType } from "../types";
|
||||
} from "../../../utils.js";
|
||||
import { snowflakeToTimestamp } from "../../../utils/snowflakeToTimestamp.js";
|
||||
import { UtilityPluginType } from "../types.js";
|
||||
|
||||
export async function getInviteInfoEmbed(
|
||||
pluginData: GuildPluginData<UtilityPluginType>,
|
||||
|
|
|
@ -8,8 +8,8 @@ import {
|
|||
renderUsername,
|
||||
trimEmptyLines,
|
||||
trimLines,
|
||||
} from "../../../utils";
|
||||
import { UtilityPluginType } from "../types";
|
||||
} from "../../../utils.js";
|
||||
import { UtilityPluginType } from "../types.js";
|
||||
|
||||
const MESSAGE_ICON = "https://cdn.discordapp.com/attachments/740650744830623756/740685652152025088/message.png";
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { APIEmbed, PermissionFlagsBits, Role } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { EmbedWith, preEmbedPadding, trimLines } from "../../../utils";
|
||||
import { EmbedWith, preEmbedPadding, trimLines } from "../../../utils.js";
|
||||
import { PERMISSION_NAMES } from "../../../utils/permissionNames.js";
|
||||
import { UtilityPluginType } from "../types";
|
||||
import { UtilityPluginType } from "../types.js";
|
||||
|
||||
const MENTION_ICON = "https://cdn.discordapp.com/attachments/705009450855039042/839284872152481792/mention.png";
|
||||
|
||||
|
|
|
@ -11,10 +11,10 @@ import {
|
|||
resolveInvite,
|
||||
resolveUser,
|
||||
trimLines,
|
||||
} from "../../../utils";
|
||||
import { idToTimestamp } from "../../../utils/idToTimestamp";
|
||||
import { UtilityPluginType } from "../types";
|
||||
import { getGuildPreview } from "./getGuildPreview";
|
||||
} from "../../../utils.js";
|
||||
import { idToTimestamp } from "../../../utils/idToTimestamp.js";
|
||||
import { UtilityPluginType } from "../types.js";
|
||||
import { getGuildPreview } from "./getGuildPreview.js";
|
||||
|
||||
const prettifyFeature = (feature: string): string =>
|
||||
`\`${feature
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { APIEmbed } from "discord.js";
|
||||
import { EmbedWith, preEmbedPadding } from "../../../utils";
|
||||
import { snowflakeToTimestamp } from "../../../utils/snowflakeToTimestamp";
|
||||
import { EmbedWith, preEmbedPadding } from "../../../utils.js";
|
||||
import { snowflakeToTimestamp } from "../../../utils/snowflakeToTimestamp.js";
|
||||
|
||||
const SNOWFLAKE_ICON = "https://cdn.discordapp.com/attachments/740650744830623756/742020790471491668/snowflake.png";
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { APIEmbed } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { CaseTypes } from "../../../data/CaseTypes";
|
||||
import { CaseTypes } from "../../../data/CaseTypes.js";
|
||||
import {
|
||||
EmbedWith,
|
||||
messageLink,
|
||||
|
@ -12,8 +12,8 @@ import {
|
|||
trimEmptyLines,
|
||||
trimLines,
|
||||
UnknownUser,
|
||||
} from "../../../utils";
|
||||
import { UtilityPluginType } from "../types";
|
||||
} from "../../../utils.js";
|
||||
import { UtilityPluginType } from "../types.js";
|
||||
|
||||
const MAX_ROLES_TO_DISPLAY = 15;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { GuildMember, Snowflake } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { UtilityPluginType } from "../types";
|
||||
import { UtilityPluginType } from "../types.js";
|
||||
|
||||
export async function hasPermission(
|
||||
pluginData: GuildPluginData<UtilityPluginType>,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { ZeppelinPluginInfo } from "../../types";
|
||||
import { zUtilityConfig } from "./types";
|
||||
import { ZeppelinPluginInfo } from "../../types.js";
|
||||
import { zUtilityConfig } from "./types.js";
|
||||
|
||||
export const utilityPluginInfo: ZeppelinPluginInfo = {
|
||||
showInDocs: true,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Guild } from "discord.js";
|
||||
import { HOURS, noop } from "../../utils";
|
||||
import { HOURS, noop } from "../../utils.js";
|
||||
|
||||
const MEMBER_REFRESH_FREQUENCY = 1 * HOURS; // How often to do a full member refresh when using commands that need it
|
||||
const memberRefreshLog = new Map<string, { time: number; promise: Promise<void> }>();
|
||||
|
|
|
@ -12,8 +12,8 @@ import {
|
|||
import escapeStringRegexp from "escape-string-regexp";
|
||||
import { ArgsFromSignatureOrArray, GuildPluginData } from "knub";
|
||||
import moment from "moment-timezone";
|
||||
import { RegExpRunner, allowTimeout } from "../../RegExpRunner";
|
||||
import { getBaseUrl } from "../../pluginUtils";
|
||||
import { RegExpRunner, allowTimeout } from "../../RegExpRunner.js";
|
||||
import { getBaseUrl } from "../../pluginUtils.js";
|
||||
import {
|
||||
InvalidRegexError,
|
||||
MINUTES,
|
||||
|
@ -22,14 +22,14 @@ import {
|
|||
renderUsername,
|
||||
sorter,
|
||||
trimLines,
|
||||
} from "../../utils";
|
||||
import { asyncFilter } from "../../utils/async";
|
||||
import { hasDiscordPermissions } from "../../utils/hasDiscordPermissions";
|
||||
import { banSearchSignature } from "./commands/BanSearchCmd";
|
||||
import { searchCmdSignature } from "./commands/SearchCmd";
|
||||
import { getUserInfoEmbed } from "./functions/getUserInfoEmbed";
|
||||
import { refreshMembersIfNeeded } from "./refreshMembers";
|
||||
import { UtilityPluginType } from "./types";
|
||||
} from "../../utils.js";
|
||||
import { asyncFilter } from "../../utils/async.js";
|
||||
import { hasDiscordPermissions } from "../../utils/hasDiscordPermissions.js";
|
||||
import { banSearchSignature } from "./commands/BanSearchCmd.js";
|
||||
import { searchCmdSignature } from "./commands/SearchCmd.js";
|
||||
import { getUserInfoEmbed } from "./functions/getUserInfoEmbed.js";
|
||||
import { refreshMembersIfNeeded } from "./refreshMembers.js";
|
||||
import { UtilityPluginType } from "./types.js";
|
||||
import Timeout = NodeJS.Timeout;
|
||||
|
||||
const SEARCH_RESULTS_PER_PAGE = 15;
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import { BasePluginType, guildPluginEventListener, guildPluginMessageCommand, pluginUtils } from "knub";
|
||||
import z from "zod";
|
||||
import { RegExpRunner } from "../../RegExpRunner";
|
||||
import { GuildArchives } from "../../data/GuildArchives";
|
||||
import { GuildCases } from "../../data/GuildCases";
|
||||
import { GuildLogs } from "../../data/GuildLogs";
|
||||
import { GuildSavedMessages } from "../../data/GuildSavedMessages";
|
||||
import { Supporters } from "../../data/Supporters";
|
||||
import { CommonPlugin } from "../Common/CommonPlugin";
|
||||
import { RegExpRunner } from "../../RegExpRunner.js";
|
||||
import { GuildArchives } from "../../data/GuildArchives.js";
|
||||
import { GuildCases } from "../../data/GuildCases.js";
|
||||
import { GuildLogs } from "../../data/GuildLogs.js";
|
||||
import { GuildSavedMessages } from "../../data/GuildSavedMessages.js";
|
||||
import { Supporters } from "../../data/Supporters.js";
|
||||
import { CommonPlugin } from "../Common/CommonPlugin.js";
|
||||
|
||||
export const zUtilityConfig = z.strictObject({
|
||||
can_roles: z.boolean(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue