mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 12:25: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,43 +1,43 @@
|
|||
import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint";
|
||||
import { ConfigSchema, UtilityPluginType } from "./types";
|
||||
import { GuildLogs } from "../../data/GuildLogs";
|
||||
import { GuildCases } from "../../data/GuildCases";
|
||||
import { GuildSavedMessages } from "../../data/GuildSavedMessages";
|
||||
import { GuildArchives } from "../../data/GuildArchives";
|
||||
import { Supporters } from "../../data/Supporters";
|
||||
import { ServerInfoCmd } from "./commands/ServerInfoCmd";
|
||||
import { RolesCmd } from "./commands/RolesCmd";
|
||||
import { LevelCmd } from "./commands/LevelCmd";
|
||||
import { SearchCmd } from "./commands/SearchCmd";
|
||||
import { BanSearchCmd } from "./commands/BanSearchCmd";
|
||||
import { UserInfoCmd } from "./commands/UserInfoCmd";
|
||||
import { NicknameResetCmd } from "./commands/NicknameResetCmd";
|
||||
import { NicknameCmd } from "./commands/NicknameCmd";
|
||||
import { PingCmd } from "./commands/PingCmd";
|
||||
import { SourceCmd } from "./commands/SourceCmd";
|
||||
import { ContextCmd } from "./commands/ContextCmd";
|
||||
import { VcmoveAllCmd, VcmoveCmd } from "./commands/VcmoveCmd";
|
||||
import { HelpCmd } from "./commands/HelpCmd";
|
||||
import { AboutCmd } from "./commands/AboutCmd";
|
||||
import { PluginOptions } from "knub";
|
||||
import { activeReloads } from "./guildReloads";
|
||||
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 { sendSuccessMessage } from "../../pluginUtils";
|
||||
import { ReloadGuildCmd } from "./commands/ReloadGuildCmd";
|
||||
import { JumboCmd } from "./commands/JumboCmd";
|
||||
import { AvatarCmd } from "./commands/AvatarCmd";
|
||||
import { CleanCmd } from "./commands/CleanCmd";
|
||||
import { InviteInfoCmd } from "./commands/InviteInfoCmd";
|
||||
import { ChannelInfoCmd } from "./commands/ChannelInfoCmd";
|
||||
import { MessageInfoCmd } from "./commands/MessageInfoCmd";
|
||||
import { InfoCmd } from "./commands/InfoCmd";
|
||||
import { SnowflakeInfoCmd } from "./commands/SnowflakeInfoCmd";
|
||||
import { discardRegExpRunner, getRegExpRunner } from "../../regExpRunners";
|
||||
import { TimeAndDatePlugin } from "../TimeAndDate/TimeAndDatePlugin";
|
||||
import { VcdisconnectCmd } from "./commands/VcdisconnectCmd";
|
||||
import { ModActionsPlugin } from "../ModActions/ModActionsPlugin";
|
||||
import { refreshMembersIfNeeded } from "./refreshMembers";
|
||||
import { RoleInfoCmd } from "./commands/RoleInfoCmd";
|
||||
import { TimeAndDatePlugin } from "../TimeAndDate/TimeAndDatePlugin";
|
||||
import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint";
|
||||
import { AboutCmd } from "./commands/AboutCmd";
|
||||
import { AvatarCmd } from "./commands/AvatarCmd";
|
||||
import { BanSearchCmd } from "./commands/BanSearchCmd";
|
||||
import { ChannelInfoCmd } from "./commands/ChannelInfoCmd";
|
||||
import { 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 { activeReloads } from "./guildReloads";
|
||||
import { refreshMembersIfNeeded } from "./refreshMembers";
|
||||
import { ConfigSchema, UtilityPluginType } from "./types";
|
||||
|
||||
const defaultOptions: PluginOptions<UtilityPluginType> = {
|
||||
config: {
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
import { utilityCmd } from "../types";
|
||||
import { EmbedWith, multiSorter, resolveMember, sorter } from "../../../utils";
|
||||
|
||||
import { getCurrentUptime } from "../../../uptime";
|
||||
import { GuildChannel, MessageOptions } from "discord.js";
|
||||
import humanizeDuration from "humanize-duration";
|
||||
import LCL from "last-commit-log";
|
||||
import path from "path";
|
||||
import moment from "moment-timezone";
|
||||
import { rootDir } from "../../../paths";
|
||||
import { getCurrentUptime } from "../../../uptime";
|
||||
import { EmbedWith, multiSorter, resolveMember, sorter } from "../../../utils";
|
||||
import { TimeAndDatePlugin } from "../../TimeAndDate/TimeAndDatePlugin";
|
||||
import { GuildChannel, MessageOptions } from "discord.js";
|
||||
import { utilityCmd } from "../types";
|
||||
|
||||
|
||||
export const AboutCmd = utilityCmd({
|
||||
trigger: "about",
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { utilityCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { UnknownUser } from "../../../utils";
|
||||
import { sendErrorMessage } from "../../../pluginUtils";
|
||||
import { MessageEmbedOptions } from "discord.js";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { sendErrorMessage } from "../../../pluginUtils";
|
||||
import { UnknownUser } from "../../../utils";
|
||||
import { utilityCmd } from "../types";
|
||||
|
||||
export const AvatarCmd = utilityCmd({
|
||||
trigger: ["avatar", "av"],
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { utilityCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { archiveSearch, displaySearch, SearchType } from "../search";
|
||||
import { utilityCmd } from "../types";
|
||||
|
||||
// Separate from BanSearchCmd to avoid a circular reference from ./search.ts
|
||||
export const banSearchSignature = {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { utilityCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { sendErrorMessage } from "../../../pluginUtils";
|
||||
import { getChannelInfoEmbed } from "../functions/getChannelInfoEmbed";
|
||||
import { utilityCmd } from "../types";
|
||||
|
||||
export const ChannelInfoCmd = utilityCmd({
|
||||
trigger: ["channel", "channelinfo"],
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
import { utilityCmd, UtilityPluginType } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { DAYS, getInviteCodesInString, noop, SECONDS, stripObjectToScalars } from "../../../utils";
|
||||
import { getBaseUrl, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
||||
|
||||
import moment from "moment-timezone";
|
||||
import { Message, TextChannel, User } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import moment from "moment-timezone";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { SavedMessage } from "../../../data/entities/SavedMessage";
|
||||
import { LogType } from "../../../data/LogType";
|
||||
import { allowTimeout } from "../../../RegExpRunner";
|
||||
import { ModActionsPlugin } from "../../../plugins/ModActions/ModActionsPlugin";
|
||||
import { TextChannel, User, Message } from "discord.js";
|
||||
import { getBaseUrl, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
||||
import { allowTimeout } from "../../../RegExpRunner";
|
||||
import { DAYS, getInviteCodesInString, noop, SECONDS, stripObjectToScalars } from "../../../utils";
|
||||
import { utilityCmd, UtilityPluginType } from "../types";
|
||||
|
||||
|
||||
const MAX_CLEAN_COUNT = 150;
|
||||
const MAX_CLEAN_TIME = 1 * DAYS;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { utilityCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { messageLink } from "../../../utils";
|
||||
import { sendErrorMessage } from "../../../pluginUtils";
|
||||
|
||||
import { canReadChannel } from "../../../utils/canReadChannel";
|
||||
import { TextChannel } from "discord.js";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { sendErrorMessage } from "../../../pluginUtils";
|
||||
import { messageLink } from "../../../utils";
|
||||
import { canReadChannel } from "../../../utils/canReadChannel";
|
||||
import { utilityCmd } from "../types";
|
||||
|
||||
|
||||
export const ContextCmd = utilityCmd({
|
||||
trigger: "context",
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { utilityCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { sendErrorMessage } from "../../../pluginUtils";
|
||||
import { customEmojiRegex } from "../../../utils";
|
||||
import { getEmojiInfoEmbed } from "../functions/getEmojiInfoEmbed";
|
||||
import { utilityCmd } from "../types";
|
||||
|
||||
export const EmojiInfoCmd = utilityCmd({
|
||||
trigger: ["emoji", "emojiinfo"],
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { utilityCmd } from "../types";
|
||||
import { LoadedGuildPlugin } from "knub";
|
||||
import { PluginCommandDefinition } from "knub/dist/commands/commandUtils";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { createChunkedMessage } from "../../../utils";
|
||||
import { PluginCommandDefinition } from "knub/dist/commands/commandUtils";
|
||||
import { LoadedGuildPlugin } from "knub";
|
||||
import { utilityCmd } from "../types";
|
||||
|
||||
export const HelpCmd = utilityCmd({
|
||||
trigger: "help",
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
import { utilityCmd } from "../types";
|
||||
import { getChannelId, getRoleId } from "knub/dist/utils";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { sendErrorMessage } from "../../../pluginUtils";
|
||||
import { getInviteInfoEmbed } from "../functions/getInviteInfoEmbed";
|
||||
import { customEmojiRegex, isValidSnowflake, parseInviteCodeInput, resolveInvite, resolveUser } from "../../../utils";
|
||||
import { getUserInfoEmbed } from "../functions/getUserInfoEmbed";
|
||||
import { resolveMessageTarget } from "../../../utils/resolveMessageTarget";
|
||||
import { canReadChannel } from "../../../utils/canReadChannel";
|
||||
import { getMessageInfoEmbed } from "../functions/getMessageInfoEmbed";
|
||||
import { resolveMessageTarget } from "../../../utils/resolveMessageTarget";
|
||||
import { getChannelInfoEmbed } from "../functions/getChannelInfoEmbed";
|
||||
import { getServerInfoEmbed } from "../functions/getServerInfoEmbed";
|
||||
import { getChannelId, getRoleId } from "knub/dist/utils";
|
||||
import { getGuildPreview } from "../functions/getGuildPreview";
|
||||
import { getSnowflakeInfoEmbed } from "../functions/getSnowflakeInfoEmbed";
|
||||
import { getRoleInfoEmbed } from "../functions/getRoleInfoEmbed";
|
||||
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";
|
||||
|
||||
export const InfoCmd = utilityCmd({
|
||||
trigger: "info",
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { utilityCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { sendErrorMessage } from "../../../pluginUtils";
|
||||
import { getInviteInfoEmbed } from "../functions/getInviteInfoEmbed";
|
||||
import { parseInviteCodeInput } from "../../../utils";
|
||||
import { getInviteInfoEmbed } from "../functions/getInviteInfoEmbed";
|
||||
import { utilityCmd } from "../types";
|
||||
|
||||
export const InviteInfoCmd = utilityCmd({
|
||||
trigger: ["invite", "inviteinfo"],
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { utilityCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { downloadFile, isEmoji, SECONDS } from "../../../utils";
|
||||
import fs from "fs";
|
||||
import sharp from "sharp";
|
||||
import twemoji from "twemoji";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { sendErrorMessage } from "../../../pluginUtils";
|
||||
import { downloadFile, isEmoji, SECONDS } from "../../../utils";
|
||||
import { utilityCmd } from "../types";
|
||||
|
||||
const fsp = fs.promises;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { utilityCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { helpers } from "knub";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { utilityCmd } from "../types";
|
||||
|
||||
const { getMemberLevel } = helpers;
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { utilityCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { sendErrorMessage } from "../../../pluginUtils";
|
||||
import { getMessageInfoEmbed } from "../functions/getMessageInfoEmbed";
|
||||
import { canReadChannel } from "../../../utils/canReadChannel";
|
||||
import { getMessageInfoEmbed } from "../functions/getMessageInfoEmbed";
|
||||
import { utilityCmd } from "../types";
|
||||
|
||||
export const MessageInfoCmd = utilityCmd({
|
||||
trigger: ["message", "messageinfo"],
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { utilityCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { errorMessage } from "../../../utils";
|
||||
import { canActOn, sendSuccessMessage } from "../../../pluginUtils";
|
||||
import { errorMessage } from "../../../utils";
|
||||
import { utilityCmd } from "../types";
|
||||
|
||||
export const NicknameCmd = utilityCmd({
|
||||
trigger: ["nickname", "nick"],
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { utilityCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { errorMessage } from "../../../utils";
|
||||
import { canActOn, sendSuccessMessage } from "../../../pluginUtils";
|
||||
import { errorMessage } from "../../../utils";
|
||||
import { utilityCmd } from "../types";
|
||||
|
||||
export const NicknameResetCmd = utilityCmd({
|
||||
trigger: ["nickname reset", "nick reset"],
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { utilityCmd } from "../types";
|
||||
import { noop, trimLines } from "../../../utils";
|
||||
import { Message } from "discord.js";
|
||||
import { noop, trimLines } from "../../../utils";
|
||||
import { utilityCmd } from "../types";
|
||||
|
||||
const { performance } = require("perf_hooks");
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { TextChannel } from "discord.js";
|
||||
import { activeReloads } from "../guildReloads";
|
||||
import { utilityCmd } from "../types";
|
||||
|
||||
import { activeReloads } from "../guildReloads";
|
||||
import { TextChannel } from "discord.js";
|
||||
|
||||
export const ReloadGuildCmd = utilityCmd({
|
||||
trigger: "reload_guild",
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import { utilityCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { sendErrorMessage } from "../../../pluginUtils";
|
||||
import { getRoleInfoEmbed } from "../functions/getRoleInfoEmbed";
|
||||
import { utilityCmd } from "../types";
|
||||
|
||||
export const RoleInfoCmd = utilityCmd({
|
||||
trigger: ["roleinfo"],
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { utilityCmd } from "../types";
|
||||
import { Role, TextChannel } from "discord.js";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
|
||||
import { sendErrorMessage } from "../../../pluginUtils";
|
||||
import { chunkArray, sorter, trimLines } from "../../../utils";
|
||||
import { refreshMembersIfNeeded } from "../refreshMembers";
|
||||
import { sendErrorMessage } from "../../../pluginUtils";
|
||||
import { Role, TextChannel } from "discord.js";
|
||||
import { utilityCmd } from "../types";
|
||||
|
||||
|
||||
export const RolesCmd = utilityCmd({
|
||||
trigger: "roles",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { utilityCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { archiveSearch, displaySearch, SearchType } from "../search";
|
||||
import { utilityCmd } from "../types";
|
||||
|
||||
// Separate from SearchCmd to avoid a circular reference from ./search.ts
|
||||
export const searchCmdSignature = {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { utilityCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { sendErrorMessage } from "../../../pluginUtils";
|
||||
import { getServerInfoEmbed } from "../functions/getServerInfoEmbed";
|
||||
import { utilityCmd } from "../types";
|
||||
|
||||
export const ServerInfoCmd = utilityCmd({
|
||||
trigger: ["server", "serverinfo"],
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
import { utilityCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { sendErrorMessage } from "../../../pluginUtils";
|
||||
import { getChannelInfoEmbed } from "../functions/getChannelInfoEmbed";
|
||||
import { getSnowflakeInfoEmbed } from "../functions/getSnowflakeInfoEmbed";
|
||||
import { utilityCmd } from "../types";
|
||||
|
||||
export const SnowflakeInfoCmd = utilityCmd({
|
||||
trigger: ["snowflake", "snowflakeinfo"],
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
import { utilityCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { errorMessage } from "../../../utils";
|
||||
import { getBaseUrl, sendErrorMessage } from "../../../pluginUtils";
|
||||
import moment from "moment-timezone";
|
||||
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { getBaseUrl, sendErrorMessage } from "../../../pluginUtils";
|
||||
import { canReadChannel } from "../../../utils/canReadChannel";
|
||||
import { utilityCmd } from "../types";
|
||||
|
||||
|
||||
export const SourceCmd = utilityCmd({
|
||||
trigger: "source",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { utilityCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { getUserInfoEmbed } from "../functions/getUserInfoEmbed";
|
||||
import { sendErrorMessage } from "../../../pluginUtils";
|
||||
import { getUserInfoEmbed } from "../functions/getUserInfoEmbed";
|
||||
import { utilityCmd } from "../types";
|
||||
|
||||
export const UserInfoCmd = utilityCmd({
|
||||
trigger: ["user", "userinfo", "whois"],
|
||||
|
|
|
@ -1,16 +1,12 @@
|
|||
import { utilityCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import {
|
||||
channelMentionRegex,
|
||||
errorMessage,
|
||||
isSnowflake,
|
||||
simpleClosestStringMatch,
|
||||
stripObjectToScalars,
|
||||
} from "../../../utils";
|
||||
import { canActOn, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
||||
|
||||
import { LogType } from "../../../data/LogType";
|
||||
import { VoiceChannel } from "discord.js";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { LogType } from "../../../data/LogType";
|
||||
import { canActOn, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
||||
import {
|
||||
stripObjectToScalars
|
||||
} from "../../../utils";
|
||||
import { utilityCmd } from "../types";
|
||||
|
||||
|
||||
export const VcdisconnectCmd = utilityCmd({
|
||||
trigger: ["vcdisconnect", "vcdisc", "vcdc", "vckick", "vck"],
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
import { utilityCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import {
|
||||
channelMentionRegex,
|
||||
errorMessage,
|
||||
isSnowflake,
|
||||
resolveMember,
|
||||
simpleClosestStringMatch,
|
||||
stripObjectToScalars,
|
||||
} from "../../../utils";
|
||||
import { canActOn, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
||||
|
||||
import { LogType } from "../../../data/LogType";
|
||||
import { VoiceChannel } from "discord.js";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { LogType } from "../../../data/LogType";
|
||||
import { canActOn, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
||||
import {
|
||||
channelMentionRegex,
|
||||
|
||||
isSnowflake,
|
||||
|
||||
simpleClosestStringMatch,
|
||||
stripObjectToScalars
|
||||
} from "../../../utils";
|
||||
import { utilityCmd } from "../types";
|
||||
|
||||
|
||||
export const VcmoveCmd = utilityCmd({
|
||||
trigger: "vcmove",
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import { GuildPluginData } from "knub";
|
||||
import { UtilityPluginType } from "../types";
|
||||
|
||||
import moment from "moment-timezone";
|
||||
import { MessageEmbedOptions, StageChannel, VoiceChannel } from "discord.js";
|
||||
import humanizeDuration from "humanize-duration";
|
||||
import { GuildPluginData } from "knub";
|
||||
import moment from "moment-timezone";
|
||||
import { ChannelTypeStrings } from "src/types";
|
||||
import { EmbedWith, formatNumber, preEmbedPadding, trimLines } from "../../../utils";
|
||||
import { TimeAndDatePlugin } from "../../TimeAndDate/TimeAndDatePlugin";
|
||||
import { MessageEmbedOptions, Constants, VoiceChannel, StageChannel } from "discord.js";
|
||||
import { ChannelTypeStrings } from "src/types";
|
||||
import { UtilityPluginType } from "../types";
|
||||
|
||||
|
||||
const TEXT_CHANNEL_ICON =
|
||||
"https://cdn.discordapp.com/attachments/740650744830623756/740656843545772062/text-channel.png";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { GuildPluginData } from "knub";
|
||||
import { UtilityPluginType } from "../types";
|
||||
import { trimLines, preEmbedPadding, EmbedWith } from "../../../utils";
|
||||
import { MessageEmbedOptions } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { EmbedWith, preEmbedPadding, trimLines } from "../../../utils";
|
||||
import { UtilityPluginType } from "../types";
|
||||
|
||||
export async function getEmojiInfoEmbed(
|
||||
pluginData: GuildPluginData<UtilityPluginType>,
|
||||
|
|
|
@ -1,24 +1,23 @@
|
|||
import { MessageEmbedOptions } from "discord.js";
|
||||
import humanizeDuration from "humanize-duration";
|
||||
import { GuildPluginData } from "knub";
|
||||
import moment from "moment-timezone";
|
||||
import { ChannelTypeStrings } from "src/types";
|
||||
import {
|
||||
EmbedWith,
|
||||
|
||||
formatNumber,
|
||||
GroupDMInvite,
|
||||
inviteHasCounts,
|
||||
isGroupDMInvite,
|
||||
isGuildInvite,
|
||||
preEmbedPadding,
|
||||
resolveInvite,
|
||||
trimLines
|
||||
} from "../../../utils";
|
||||
import { snowflakeToTimestamp } from "../../../utils/snowflakeToTimestamp";
|
||||
import { UtilityPluginType } from "../types";
|
||||
|
||||
import { snowflakeToTimestamp } from "../../../utils/snowflakeToTimestamp";
|
||||
import moment from "moment-timezone";
|
||||
import humanizeDuration from "humanize-duration";
|
||||
import {
|
||||
embedPadding,
|
||||
EmbedWith,
|
||||
emptyEmbedValue,
|
||||
formatNumber,
|
||||
GroupDMInvite,
|
||||
inviteHasCounts,
|
||||
isGroupDMInvite,
|
||||
isGuildInvite,
|
||||
preEmbedPadding,
|
||||
resolveInvite,
|
||||
trimLines,
|
||||
} from "../../../utils";
|
||||
import { MessageEmbedOptions, Constants, Invite } from "discord.js";
|
||||
import { ChannelTypeStrings } from "src/types";
|
||||
|
||||
export async function getInviteInfoEmbed(
|
||||
pluginData: GuildPluginData<UtilityPluginType>,
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
import { MessageEmbedOptions, TextChannel } from "discord.js";
|
||||
import humanizeDuration from "humanize-duration";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { getDefaultPrefix } from "knub/dist/commands/commandUtils";
|
||||
import moment from "moment-timezone";
|
||||
import { MessageTypeStrings } from "src/types";
|
||||
import { chunkMessageLines, EmbedWith, messageLink, preEmbedPadding, trimEmptyLines, trimLines } from "../../../utils";
|
||||
import { TimeAndDatePlugin } from "../../TimeAndDate/TimeAndDatePlugin";
|
||||
import { UtilityPluginType } from "../types";
|
||||
|
||||
import moment from "moment-timezone";
|
||||
import humanizeDuration from "humanize-duration";
|
||||
import { chunkMessageLines, EmbedWith, messageLink, preEmbedPadding, trimEmptyLines, trimLines } from "../../../utils";
|
||||
import { getDefaultPrefix } from "knub/dist/commands/commandUtils";
|
||||
import { TimeAndDatePlugin } from "../../TimeAndDate/TimeAndDatePlugin";
|
||||
import { MessageEmbedOptions, Constants, TextChannel } from "discord.js";
|
||||
import { MessageTypeStrings } from "src/types";
|
||||
|
||||
const MESSAGE_ICON = "https://cdn.discordapp.com/attachments/740650744830623756/740685652152025088/message.png";
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { GuildPluginData } from "knub";
|
||||
import { UtilityPluginType } from "../types";
|
||||
import { trimLines, preEmbedPadding, EmbedWith } from "../../../utils";
|
||||
import moment from "moment-timezone";
|
||||
import { MessageEmbedOptions, Role } from "discord.js";
|
||||
import humanizeDuration from "humanize-duration";
|
||||
import { GuildPluginData } from "knub";
|
||||
import moment from "moment-timezone";
|
||||
import { EmbedWith, preEmbedPadding, trimLines } from "../../../utils";
|
||||
import { TimeAndDatePlugin } from "../../TimeAndDate/TimeAndDatePlugin";
|
||||
import { Role, MessageEmbedOptions } from "discord.js";
|
||||
import { UtilityPluginType } from "../types";
|
||||
|
||||
const MENTION_ICON = "https://cdn.discordapp.com/attachments/705009450855039042/839284872152481792/mention.png";
|
||||
|
||||
|
|
|
@ -1,23 +1,22 @@
|
|||
import { GuildPluginData } from "knub";
|
||||
import { UtilityPluginType } from "../types";
|
||||
import {
|
||||
embedPadding,
|
||||
EmbedWith,
|
||||
formatNumber,
|
||||
inviteHasCounts,
|
||||
memoize,
|
||||
MINUTES,
|
||||
preEmbedPadding,
|
||||
resolveInvite,
|
||||
resolveUser,
|
||||
trimLines,
|
||||
} from "../../../utils";
|
||||
|
||||
import moment from "moment-timezone";
|
||||
import { CategoryChannel, MessageEmbedOptions, TextChannel, VoiceChannel } from "discord.js";
|
||||
import humanizeDuration from "humanize-duration";
|
||||
import { getGuildPreview } from "./getGuildPreview";
|
||||
import { GuildPluginData } from "knub";
|
||||
import moment from "moment-timezone";
|
||||
import {
|
||||
EmbedWith,
|
||||
formatNumber,
|
||||
inviteHasCounts,
|
||||
memoize,
|
||||
MINUTES,
|
||||
preEmbedPadding,
|
||||
resolveInvite,
|
||||
resolveUser,
|
||||
trimLines
|
||||
} from "../../../utils";
|
||||
import { TimeAndDatePlugin } from "../../TimeAndDate/TimeAndDatePlugin";
|
||||
import { MessageEmbedOptions, CategoryChannel, TextChannel, VoiceChannel } from "discord.js";
|
||||
import { UtilityPluginType } from "../types";
|
||||
import { getGuildPreview } from "./getGuildPreview";
|
||||
|
||||
|
||||
export async function getServerInfoEmbed(
|
||||
pluginData: GuildPluginData<UtilityPluginType>,
|
||||
|
|
|
@ -1,20 +1,13 @@
|
|||
import { GuildPluginData } from "knub";
|
||||
import { UtilityPluginType } from "../types";
|
||||
import {
|
||||
UnknownUser,
|
||||
trimLines,
|
||||
embedPadding,
|
||||
resolveMember,
|
||||
resolveUser,
|
||||
preEmbedPadding,
|
||||
EmbedWith,
|
||||
} from "../../../utils";
|
||||
import moment from "moment-timezone";
|
||||
import { CaseTypes } from "../../../data/CaseTypes";
|
||||
import { MessageEmbedOptions } from "discord.js";
|
||||
import humanizeDuration from "humanize-duration";
|
||||
import { GuildPluginData } from "knub";
|
||||
import moment from "moment-timezone";
|
||||
import {
|
||||
EmbedWith, preEmbedPadding
|
||||
} from "../../../utils";
|
||||
import { snowflakeToTimestamp } from "../../../utils/snowflakeToTimestamp";
|
||||
import { TimeAndDatePlugin } from "../../TimeAndDate/TimeAndDatePlugin";
|
||||
import { MessageEmbedOptions } from "discord.js";
|
||||
import { UtilityPluginType } from "../types";
|
||||
|
||||
const SNOWFLAKE_ICON = "https://cdn.discordapp.com/attachments/740650744830623756/742020790471491668/snowflake.png";
|
||||
|
||||
|
|
|
@ -1,21 +1,16 @@
|
|||
import { MessageEmbedOptions, Role } from "discord.js";
|
||||
import humanizeDuration from "humanize-duration";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { UtilityPluginType } from "../types";
|
||||
import {
|
||||
UnknownUser,
|
||||
trimLines,
|
||||
embedPadding,
|
||||
resolveMember,
|
||||
resolveUser,
|
||||
preEmbedPadding,
|
||||
sorter,
|
||||
messageLink,
|
||||
EmbedWith,
|
||||
} from "../../../utils";
|
||||
import moment from "moment-timezone";
|
||||
import { CaseTypes } from "../../../data/CaseTypes";
|
||||
import humanizeDuration from "humanize-duration";
|
||||
import {
|
||||
EmbedWith, messageLink, preEmbedPadding, resolveMember,
|
||||
resolveUser,
|
||||
|
||||
sorter, trimLines, UnknownUser
|
||||
} from "../../../utils";
|
||||
import { TimeAndDatePlugin } from "../../TimeAndDate/TimeAndDatePlugin";
|
||||
import { MessageEmbedOptions, Role } from "discord.js";
|
||||
import { UtilityPluginType } from "../types";
|
||||
|
||||
export async function getUserInfoEmbed(
|
||||
pluginData: GuildPluginData<UtilityPluginType>,
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
import moment from "moment-timezone";
|
||||
import { GuildMember, Message, Permissions, TextChannel, User } from "discord.js";
|
||||
import escapeStringRegexp from "escape-string-regexp";
|
||||
import { isFullMessage, MINUTES, multiSorter, noop, sorter, trimLines } from "../../utils";
|
||||
import { getBaseUrl, sendErrorMessage } from "../../pluginUtils";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { ArgsFromSignatureOrArray } from "knub/dist/commands/commandUtils";
|
||||
import { searchCmdSignature } from "./commands/SearchCmd";
|
||||
import { banSearchSignature } from "./commands/BanSearchCmd";
|
||||
import { UtilityPluginType } from "./types";
|
||||
import { refreshMembersIfNeeded } from "./refreshMembers";
|
||||
import { getUserInfoEmbed } from "./functions/getUserInfoEmbed";
|
||||
import moment from "moment-timezone";
|
||||
import { getBaseUrl, sendErrorMessage } from "../../pluginUtils";
|
||||
import { allowTimeout, RegExpRunner } from "../../RegExpRunner";
|
||||
import { inputPatternToRegExp, InvalidRegexError } from "../../validatorUtils";
|
||||
import { isFullMessage, MINUTES, multiSorter, noop, sorter, trimLines } from "../../utils";
|
||||
import { asyncFilter } from "../../utils/async";
|
||||
import Timeout = NodeJS.Timeout;
|
||||
import { hasDiscordPermissions } from "../../utils/hasDiscordPermissions";
|
||||
import { Message, User, Constants, TextChannel, GuildMember, Permissions } from "discord.js";
|
||||
import { inputPatternToRegExp, InvalidRegexError } from "../../validatorUtils";
|
||||
import { banSearchSignature } from "./commands/BanSearchCmd";
|
||||
import { searchCmdSignature } from "./commands/SearchCmd";
|
||||
import { getUserInfoEmbed } from "./functions/getUserInfoEmbed";
|
||||
import { refreshMembersIfNeeded } from "./refreshMembers";
|
||||
import { UtilityPluginType } from "./types";
|
||||
import Timeout = NodeJS.Timeout;
|
||||
|
||||
const SEARCH_RESULTS_PER_PAGE = 15;
|
||||
const SEARCH_ID_RESULTS_PER_PAGE = 50;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import * as t from "io-ts";
|
||||
import { BasePluginType, typedGuildCommand, typedGuildEventListener } from "knub";
|
||||
import { GuildLogs } from "../../data/GuildLogs";
|
||||
import { GuildCases } from "../../data/GuildCases";
|
||||
import { GuildSavedMessages } from "../../data/GuildSavedMessages";
|
||||
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 { RegExpRunner } from "../../RegExpRunner";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue