mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-16 14:11:50 +00:00
DJS Update, Full Import Cleanup
This commit is contained in:
parent
acb4913495
commit
c932269b7d
67 changed files with 119 additions and 144 deletions
22
backend/package-lock.json
generated
22
backend/package-lock.json
generated
|
@ -14,7 +14,7 @@
|
||||||
"cors": "^2.8.5",
|
"cors": "^2.8.5",
|
||||||
"cross-env": "^5.2.0",
|
"cross-env": "^5.2.0",
|
||||||
"deep-diff": "^1.0.2",
|
"deep-diff": "^1.0.2",
|
||||||
"discord.js": "^13.0.0-dev.07017a9.1626869177",
|
"discord.js": "^13.0.0-dev.4886ae2.1627214570",
|
||||||
"dotenv": "^4.0.0",
|
"dotenv": "^4.0.0",
|
||||||
"emoji-regex": "^8.0.0",
|
"emoji-regex": "^8.0.0",
|
||||||
"erlpack": "github:discord/erlpack",
|
"erlpack": "github:discord/erlpack",
|
||||||
|
@ -81,8 +81,8 @@
|
||||||
"version": "30.0.0-beta.38",
|
"version": "30.0.0-beta.38",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"discord-api-types": "^0.19.0-next.836e8fb.1625574825",
|
"discord-api-types": "^0.21.0-next.ab1951b.1626870574",
|
||||||
"discord.js": "^13.0.0-dev.07017a9.1626869177",
|
"discord.js": "^13.0.0-dev.4886ae2.1627214570",
|
||||||
"knub-command-manager": "^9.1.0",
|
"knub-command-manager": "^9.1.0",
|
||||||
"ts-essentials": "^6.0.7"
|
"ts-essentials": "^6.0.7"
|
||||||
},
|
},
|
||||||
|
@ -2159,9 +2159,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/discord.js": {
|
"node_modules/discord.js": {
|
||||||
"version": "13.0.0-dev.07017a9.1626869177",
|
"version": "13.0.0-dev.4886ae2.1627214570",
|
||||||
"resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.0.0-dev.07017a9.1626869177.tgz",
|
"resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.0.0-dev.4886ae2.1627214570.tgz",
|
||||||
"integrity": "sha512-awnE/59Sy6tnoAZUP7/f8tudcDT68WXxK0pgZZpA7WTGfyR5+IokWsFmkbS49dDll7OZQbi+L8iRt8ahYo3PGQ==",
|
"integrity": "sha512-9eqVCQyqqSHJcR1nki9NlaTD7FjvfkjJt8zcmF5wcCs/7P9v27UrPYg9yxvghswDvDhz9ojotYGGcpK7tSypmA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@discordjs/builders": "^0.2.0",
|
"@discordjs/builders": "^0.2.0",
|
||||||
"@discordjs/collection": "^0.1.6",
|
"@discordjs/collection": "^0.1.6",
|
||||||
|
@ -8034,9 +8034,9 @@
|
||||||
"integrity": "sha512-hNC38R9ZF4uaujaZQtQfm5CdQO58uhdkoHQAVvMfIL0LgOSZeW575W8H6upngQOuoxWd8tiRII3LLJm9zuQKYg=="
|
"integrity": "sha512-hNC38R9ZF4uaujaZQtQfm5CdQO58uhdkoHQAVvMfIL0LgOSZeW575W8H6upngQOuoxWd8tiRII3LLJm9zuQKYg=="
|
||||||
},
|
},
|
||||||
"discord.js": {
|
"discord.js": {
|
||||||
"version": "13.0.0-dev.07017a9.1626869177",
|
"version": "13.0.0-dev.4886ae2.1627214570",
|
||||||
"resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.0.0-dev.07017a9.1626869177.tgz",
|
"resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.0.0-dev.4886ae2.1627214570.tgz",
|
||||||
"integrity": "sha512-awnE/59Sy6tnoAZUP7/f8tudcDT68WXxK0pgZZpA7WTGfyR5+IokWsFmkbS49dDll7OZQbi+L8iRt8ahYo3PGQ==",
|
"integrity": "sha512-9eqVCQyqqSHJcR1nki9NlaTD7FjvfkjJt8zcmF5wcCs/7P9v27UrPYg9yxvghswDvDhz9ojotYGGcpK7tSypmA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@discordjs/builders": "^0.2.0",
|
"@discordjs/builders": "^0.2.0",
|
||||||
"@discordjs/collection": "^0.1.6",
|
"@discordjs/collection": "^0.1.6",
|
||||||
|
@ -8877,8 +8877,8 @@
|
||||||
"@typescript-eslint/eslint-plugin": "^4.23.0",
|
"@typescript-eslint/eslint-plugin": "^4.23.0",
|
||||||
"@typescript-eslint/parser": "^4.23.0",
|
"@typescript-eslint/parser": "^4.23.0",
|
||||||
"chai": "^4.3.4",
|
"chai": "^4.3.4",
|
||||||
"discord-api-types": "^0.19.0-next.836e8fb.1625574825",
|
"discord-api-types": "^0.21.0-next.ab1951b.1626870574",
|
||||||
"discord.js": "^13.0.0-dev.07017a9.1626869177",
|
"discord.js": "^13.0.0-dev.4886ae2.1627214570",
|
||||||
"eslint": "^7.2.0",
|
"eslint": "^7.2.0",
|
||||||
"husky": "^4.3.8",
|
"husky": "^4.3.8",
|
||||||
"knub-command-manager": "^9.1.0",
|
"knub-command-manager": "^9.1.0",
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
"cors": "^2.8.5",
|
"cors": "^2.8.5",
|
||||||
"cross-env": "^5.2.0",
|
"cross-env": "^5.2.0",
|
||||||
"deep-diff": "^1.0.2",
|
"deep-diff": "^1.0.2",
|
||||||
"discord.js": "^13.0.0-dev.07017a9.1626869177",
|
"discord.js": "^13.0.0-dev.4886ae2.1627214570",
|
||||||
"dotenv": "^4.0.0",
|
"dotenv": "^4.0.0",
|
||||||
"emoji-regex": "^8.0.0",
|
"emoji-regex": "^8.0.0",
|
||||||
"erlpack": "github:discord/erlpack",
|
"erlpack": "github:discord/erlpack",
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { Column, Entity, PrimaryColumn, Unique } from "typeorm";
|
import { Column, Entity, PrimaryColumn } from "typeorm";
|
||||||
|
|
||||||
@Entity("button_roles")
|
@Entity("button_roles")
|
||||||
export class ButtonRole {
|
export class ButtonRole {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { Client, Collection, Intents, Options, TextChannel } from "discord.js";
|
import { Client, Intents, TextChannel } from "discord.js";
|
||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
import yaml from "js-yaml";
|
import yaml from "js-yaml";
|
||||||
import { Knub, PluginError } from "knub";
|
import { Knub, PluginError } from "knub";
|
||||||
|
@ -19,7 +19,7 @@ import { RecoverablePluginError } from "./RecoverablePluginError";
|
||||||
import { SimpleError } from "./SimpleError";
|
import { SimpleError } from "./SimpleError";
|
||||||
import { ZeppelinGlobalConfig, ZeppelinGuildConfig } from "./types";
|
import { ZeppelinGlobalConfig, ZeppelinGuildConfig } from "./types";
|
||||||
import { startUptimeCounter } from "./uptime";
|
import { startUptimeCounter } from "./uptime";
|
||||||
import { errorMessage, isDiscordHTTPError, isDiscordAPIError, successMessage } from "./utils";
|
import { errorMessage, isDiscordAPIError, isDiscordHTTPError, successMessage } from "./utils";
|
||||||
|
|
||||||
const fsp = fs.promises;
|
const fsp = fs.promises;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { Permissions, Snowflake, TextChannel, User } from "discord.js";
|
import { Permissions, Snowflake, TextChannel } from "discord.js";
|
||||||
import { GuildPluginData } from "knub";
|
import { GuildPluginData } from "knub";
|
||||||
import moment from "moment-timezone";
|
import moment from "moment-timezone";
|
||||||
import { channelToConfigAccessibleChannel, userToConfigAccessibleUser } from "src/utils/configAccessibleObjects";
|
import { channelToConfigAccessibleChannel, userToConfigAccessibleUser } from "../../../utils/configAccessibleObjects";
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
import { logger } from "../../../logger";
|
import { logger } from "../../../logger";
|
||||||
import { resolveUser, verboseChannelMention } from "../../../utils";
|
import { resolveUser, verboseChannelMention } from "../../../utils";
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { MessageOptions, Permissions, Snowflake, TextChannel, User } from "discord.js";
|
import { MessageOptions, Permissions, Snowflake, TextChannel, User } from "discord.js";
|
||||||
import * as t from "io-ts";
|
import * as t from "io-ts";
|
||||||
import { userToConfigAccessibleUser } from "src/utils/configAccessibleObjects";
|
import { userToConfigAccessibleUser } from "../../../utils/configAccessibleObjects";
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
import { renderTemplate } from "../../../templateFormatter";
|
import { renderTemplate } from "../../../templateFormatter";
|
||||||
import {
|
import {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { User } from "discord.js";
|
import { User } from "discord.js";
|
||||||
import { GuildPluginData } from "knub";
|
import { GuildPluginData } from "knub";
|
||||||
import { userToConfigAccessibleUser } from "src/utils/configAccessibleObjects";
|
import { userToConfigAccessibleUser } from "../../../utils/configAccessibleObjects";
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||||
import { runAutomodOnAntiraidLevel } from "../events/runAutomodOnAntiraidLevel";
|
import { runAutomodOnAntiraidLevel } from "../events/runAutomodOnAntiraidLevel";
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { Snowflake, TextChannel, User } from "discord.js";
|
import { Snowflake, TextChannel } from "discord.js";
|
||||||
import { GuildPluginData } from "knub";
|
import { GuildPluginData } from "knub";
|
||||||
import { deactivateMentions, disableCodeBlocks } from "knub/dist/helpers";
|
import { deactivateMentions, disableCodeBlocks } from "knub/dist/helpers";
|
||||||
import { channelToConfigAccessibleChannel, userToConfigAccessibleUser } from "src/utils/configAccessibleObjects";
|
import { channelToConfigAccessibleChannel, userToConfigAccessibleUser } from "../../../utils/configAccessibleObjects";
|
||||||
import { SavedMessage } from "../../../data/entities/SavedMessage";
|
import { SavedMessage } from "../../../data/entities/SavedMessage";
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
import { resolveUser } from "../../../utils";
|
import { resolveUser } from "../../../utils";
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { channelToConfigAccessibleChannel } from "../../../utils/configAccessibleObjects";
|
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
import { differenceToString, getScalarDifference } from "../../../utils";
|
import { differenceToString, getScalarDifference } from "../../../utils";
|
||||||
|
import { channelToConfigAccessibleChannel } from "../../../utils/configAccessibleObjects";
|
||||||
import { logsEvt } from "../types";
|
import { logsEvt } from "../types";
|
||||||
|
|
||||||
export const LogsChannelCreateEvt = logsEvt({
|
export const LogsChannelCreateEvt = logsEvt({
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { GuildAuditLogs } from "discord.js";
|
import { GuildAuditLogs } from "discord.js";
|
||||||
import { userToConfigAccessibleUser } from "../../../utils/configAccessibleObjects";
|
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
|
import { userToConfigAccessibleUser } from "../../../utils/configAccessibleObjects";
|
||||||
import { safeFindRelevantAuditLogEntry } from "../../../utils/safeFindRelevantAuditLogEntry";
|
import { safeFindRelevantAuditLogEntry } from "../../../utils/safeFindRelevantAuditLogEntry";
|
||||||
import { logsEvt } from "../types";
|
import { logsEvt } from "../types";
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import humanizeDuration from "humanize-duration";
|
import humanizeDuration from "humanize-duration";
|
||||||
import moment from "moment-timezone";
|
import moment from "moment-timezone";
|
||||||
import { memberToConfigAccessibleMember } from "../../../utils/configAccessibleObjects";
|
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
|
import { memberToConfigAccessibleMember } from "../../../utils/configAccessibleObjects";
|
||||||
import { CasesPlugin } from "../../Cases/CasesPlugin";
|
import { CasesPlugin } from "../../Cases/CasesPlugin";
|
||||||
import { logsEvt } from "../types";
|
import { logsEvt } from "../types";
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { memberToConfigAccessibleMember } from "../../../utils/configAccessibleObjects";
|
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
|
import { memberToConfigAccessibleMember } from "../../../utils/configAccessibleObjects";
|
||||||
import { logsEvt } from "../types";
|
import { logsEvt } from "../types";
|
||||||
|
|
||||||
export const LogsGuildMemberRemoveEvt = logsEvt({
|
export const LogsGuildMemberRemoveEvt = logsEvt({
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { roleToConfigAccessibleRole } from "../../../utils/configAccessibleObjects";
|
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
import { differenceToString, getScalarDifference } from "../../../utils";
|
import { differenceToString, getScalarDifference } from "../../../utils";
|
||||||
|
import { roleToConfigAccessibleRole } from "../../../utils/configAccessibleObjects";
|
||||||
import { logsEvt } from "../types";
|
import { logsEvt } from "../types";
|
||||||
|
|
||||||
export const LogsRoleCreateEvt = logsEvt({
|
export const LogsRoleCreateEvt = logsEvt({
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { channelToConfigAccessibleChannel, stageToConfigAccessibleStage } from "../../../utils/configAccessibleObjects";
|
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
import { differenceToString, getScalarDifference, stripObjectToScalars } from "../../../utils";
|
import { differenceToString, getScalarDifference } from "../../../utils";
|
||||||
|
import { channelToConfigAccessibleChannel, stageToConfigAccessibleStage } from "../../../utils/configAccessibleObjects";
|
||||||
import { logsEvt } from "../types";
|
import { logsEvt } from "../types";
|
||||||
|
|
||||||
export const LogsStageInstanceCreateEvt = logsEvt({
|
export const LogsStageInstanceCreateEvt = logsEvt({
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { channelToConfigAccessibleChannel } from "../../../utils/configAccessibleObjects";
|
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
import { stripObjectToScalars, getScalarDifference, differenceToString } from "../../../utils";
|
import { differenceToString, getScalarDifference } from "../../../utils";
|
||||||
|
import { channelToConfigAccessibleChannel } from "../../../utils/configAccessibleObjects";
|
||||||
import { logsEvt } from "../types";
|
import { logsEvt } from "../types";
|
||||||
|
|
||||||
export const LogsThreadCreateEvt = logsEvt({
|
export const LogsThreadCreateEvt = logsEvt({
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { GuildAuditLogs } from "discord.js";
|
import { GuildAuditLogs } from "discord.js";
|
||||||
import diff from "lodash.difference";
|
import diff from "lodash.difference";
|
||||||
import isEqual from "lodash.isequal";
|
import isEqual from "lodash.isequal";
|
||||||
import { memberToConfigAccessibleMember, userToConfigAccessibleUser } from "src/utils/configAccessibleObjects";
|
import { memberToConfigAccessibleMember, userToConfigAccessibleUser } from "../../../utils/configAccessibleObjects";
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
import { safeFindRelevantAuditLogEntry } from "../../../utils/safeFindRelevantAuditLogEntry";
|
import { safeFindRelevantAuditLogEntry } from "../../../utils/safeFindRelevantAuditLogEntry";
|
||||||
import { logsEvt } from "../types";
|
import { logsEvt } from "../types";
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
import { channelToConfigAccessibleChannel, memberToConfigAccessibleMember } from "src/utils/configAccessibleObjects";
|
import {
|
||||||
|
channelToConfigAccessibleChannel,
|
||||||
|
memberToConfigAccessibleMember,
|
||||||
|
} from "../../../utils/configAccessibleObjects";
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
import { stripObjectToScalars } from "../../../utils";
|
|
||||||
import { logsEvt } from "../types";
|
import { logsEvt } from "../types";
|
||||||
|
|
||||||
export const LogsVoiceStateUpdateEvt = logsEvt({
|
export const LogsVoiceStateUpdateEvt = logsEvt({
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { MessageAttachment, Snowflake, User } from "discord.js";
|
import { MessageAttachment, Snowflake } from "discord.js";
|
||||||
import { GuildPluginData } from "knub";
|
import { GuildPluginData } from "knub";
|
||||||
import moment from "moment-timezone";
|
import moment from "moment-timezone";
|
||||||
import { channelToConfigAccessibleChannel, userToConfigAccessibleUser } from "src/utils/configAccessibleObjects";
|
import { channelToConfigAccessibleChannel, userToConfigAccessibleUser } from "../../../utils/configAccessibleObjects";
|
||||||
import { SavedMessage } from "../../../data/entities/SavedMessage";
|
import { SavedMessage } from "../../../data/entities/SavedMessage";
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
import { resolveUser, useMediaUrls } from "../../../utils";
|
import { resolveUser, useMediaUrls } from "../../../utils";
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import { MessageEmbed, Snowflake, User } from "discord.js";
|
import { MessageEmbed, Snowflake } from "discord.js";
|
||||||
import { GuildPluginData } from "knub";
|
import { GuildPluginData } from "knub";
|
||||||
import cloneDeep from "lodash.clonedeep";
|
import cloneDeep from "lodash.clonedeep";
|
||||||
import { channelToConfigAccessibleChannel, userToConfigAccessibleUser } from "src/utils/configAccessibleObjects";
|
import { channelToConfigAccessibleChannel, userToConfigAccessibleUser } from "../../../utils/configAccessibleObjects";
|
||||||
import { SavedMessage } from "../../../data/entities/SavedMessage";
|
import { SavedMessage } from "../../../data/entities/SavedMessage";
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
import { resolveUser, stripObjectToScalars } from "../../../utils";
|
import { resolveUser } from "../../../utils";
|
||||||
import { LogsPluginType } from "../types";
|
import { LogsPluginType } from "../types";
|
||||||
|
|
||||||
export async function onMessageUpdate(
|
export async function onMessageUpdate(
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { userToConfigAccessibleUser } from "src/utils/configAccessibleObjects";
|
import { userToConfigAccessibleUser } from "../../../utils/configAccessibleObjects";
|
||||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||||
import { CaseTypes } from "../../../data/CaseTypes";
|
import { CaseTypes } from "../../../data/CaseTypes";
|
||||||
import { Case } from "../../../data/entities/Case";
|
import { Case } from "../../../data/entities/Case";
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import { User } from "discord.js";
|
|
||||||
import humanizeDuration from "humanize-duration";
|
import humanizeDuration from "humanize-duration";
|
||||||
import { getMemberLevel } from "knub/dist/helpers";
|
import { getMemberLevel } from "knub/dist/helpers";
|
||||||
import { userToConfigAccessibleUser } from "src/utils/configAccessibleObjects";
|
import { userToConfigAccessibleUser } from "../../../utils/configAccessibleObjects";
|
||||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||||
import { CaseTypes } from "../../../data/CaseTypes";
|
import { CaseTypes } from "../../../data/CaseTypes";
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { TextChannel } from "discord.js";
|
import { TextChannel } from "discord.js";
|
||||||
import { helpers } from "knub";
|
import { helpers } from "knub";
|
||||||
import { memberToConfigAccessibleMember } from "src/utils/configAccessibleObjects";
|
import { memberToConfigAccessibleMember } from "../../../utils/configAccessibleObjects";
|
||||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||||
import { Case } from "../../../data/entities/Case";
|
import { Case } from "../../../data/entities/Case";
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { Snowflake } from "discord.js";
|
import { Snowflake } from "discord.js";
|
||||||
import { userToConfigAccessibleUser } from "src/utils/configAccessibleObjects";
|
import { userToConfigAccessibleUser } from "../../../utils/configAccessibleObjects";
|
||||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||||
import { CaseTypes } from "../../../data/CaseTypes";
|
import { CaseTypes } from "../../../data/CaseTypes";
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
import { Snowflake, TextChannel } from "discord.js";
|
import { Snowflake, TextChannel } from "discord.js";
|
||||||
import { waitForReply } from "knub/dist/helpers";
|
import { waitForReply } from "knub/dist/helpers";
|
||||||
import { performance } from "perf_hooks";
|
import { performance } from "perf_hooks";
|
||||||
import { userToConfigAccessibleUser } from "src/utils/configAccessibleObjects";
|
import { userToConfigAccessibleUser } from "../../../utils/configAccessibleObjects";
|
||||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||||
import { CaseTypes } from "../../../data/CaseTypes";
|
import { CaseTypes } from "../../../data/CaseTypes";
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
import { humanizeDurationShort } from "../../../humanizeDurationShort";
|
import { humanizeDurationShort } from "../../../humanizeDurationShort";
|
||||||
import { CasesPlugin } from "../../../plugins/Cases/CasesPlugin";
|
import { CasesPlugin } from "../../../plugins/Cases/CasesPlugin";
|
||||||
import { canActOn, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
import { canActOn, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
||||||
import { MINUTES, noop, stripObjectToScalars } from "../../../utils";
|
import { MINUTES, noop } from "../../../utils";
|
||||||
import { formatReasonWithAttachments } from "../functions/formatReasonWithAttachments";
|
import { formatReasonWithAttachments } from "../functions/formatReasonWithAttachments";
|
||||||
import { ignoreEvent } from "../functions/ignoreEvent";
|
import { ignoreEvent } from "../functions/ignoreEvent";
|
||||||
import { IgnoredEventType, modActionsCmd } from "../types";
|
import { IgnoredEventType, modActionsCmd } from "../types";
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
import { Snowflake, TextChannel } from "discord.js";
|
import { Snowflake, TextChannel } from "discord.js";
|
||||||
import { waitForReply } from "knub/dist/helpers";
|
import { waitForReply } from "knub/dist/helpers";
|
||||||
import { userToConfigAccessibleUser } from "src/utils/configAccessibleObjects";
|
import { userToConfigAccessibleUser } from "../../../utils/configAccessibleObjects";
|
||||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||||
import { CaseTypes } from "../../../data/CaseTypes";
|
import { CaseTypes } from "../../../data/CaseTypes";
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
import { sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
import { sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
||||||
import { stripObjectToScalars } from "../../../utils";
|
|
||||||
import { CasesPlugin } from "../../Cases/CasesPlugin";
|
import { CasesPlugin } from "../../Cases/CasesPlugin";
|
||||||
import { formatReasonWithAttachments } from "../functions/formatReasonWithAttachments";
|
import { formatReasonWithAttachments } from "../functions/formatReasonWithAttachments";
|
||||||
import { ignoreEvent } from "../functions/ignoreEvent";
|
import { ignoreEvent } from "../functions/ignoreEvent";
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
import { Snowflake, TextChannel } from "discord.js";
|
import { Snowflake, TextChannel } from "discord.js";
|
||||||
import { waitForReply } from "knub/dist/helpers";
|
import { waitForReply } from "knub/dist/helpers";
|
||||||
import { userToConfigAccessibleUser } from "src/utils/configAccessibleObjects";
|
import { userToConfigAccessibleUser } from "../../../utils/configAccessibleObjects";
|
||||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
import { logger } from "../../../logger";
|
import { logger } from "../../../logger";
|
||||||
import { MutesPlugin } from "../../../plugins/Mutes/MutesPlugin";
|
import { MutesPlugin } from "../../../plugins/Mutes/MutesPlugin";
|
||||||
import { canActOn, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
import { canActOn, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
||||||
import { stripObjectToScalars } from "../../../utils";
|
|
||||||
import { formatReasonWithAttachments } from "../functions/formatReasonWithAttachments";
|
import { formatReasonWithAttachments } from "../functions/formatReasonWithAttachments";
|
||||||
import { modActionsCmd } from "../types";
|
import { modActionsCmd } from "../types";
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import { User } from "discord.js";
|
import { userToConfigAccessibleUser } from "../../../utils/configAccessibleObjects";
|
||||||
import { userToConfigAccessibleUser } from "src/utils/configAccessibleObjects";
|
|
||||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||||
import { CaseTypes } from "../../../data/CaseTypes";
|
import { CaseTypes } from "../../../data/CaseTypes";
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { Snowflake } from "discord.js";
|
import { Snowflake } from "discord.js";
|
||||||
import { userToConfigAccessibleUser } from "src/utils/configAccessibleObjects";
|
import { userToConfigAccessibleUser } from "../../../utils/configAccessibleObjects";
|
||||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||||
import { CaseTypes } from "../../../data/CaseTypes";
|
import { CaseTypes } from "../../../data/CaseTypes";
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { GuildAuditLogs, User } from "discord.js";
|
import { GuildAuditLogs, User } from "discord.js";
|
||||||
import { userToConfigAccessibleUser } from "src/utils/configAccessibleObjects";
|
import { userToConfigAccessibleUser } from "../../../utils/configAccessibleObjects";
|
||||||
import { CaseTypes } from "../../../data/CaseTypes";
|
import { CaseTypes } from "../../../data/CaseTypes";
|
||||||
import { Case } from "../../../data/entities/Case";
|
import { Case } from "../../../data/entities/Case";
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
import { resolveUser, stripObjectToScalars, UnknownUser } from "../../../utils";
|
import { resolveUser, UnknownUser } from "../../../utils";
|
||||||
import { safeFindRelevantAuditLogEntry } from "../../../utils/safeFindRelevantAuditLogEntry";
|
import { safeFindRelevantAuditLogEntry } from "../../../utils/safeFindRelevantAuditLogEntry";
|
||||||
import { CasesPlugin } from "../../Cases/CasesPlugin";
|
import { CasesPlugin } from "../../Cases/CasesPlugin";
|
||||||
import { clearIgnoredEvents } from "../functions/clearIgnoredEvents";
|
import { clearIgnoredEvents } from "../functions/clearIgnoredEvents";
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { GuildAuditLogs, User } from "discord.js";
|
import { GuildAuditLogs, User } from "discord.js";
|
||||||
import { userToConfigAccessibleUser } from "src/utils/configAccessibleObjects";
|
import { userToConfigAccessibleUser } from "../../../utils/configAccessibleObjects";
|
||||||
import { CaseTypes } from "../../../data/CaseTypes";
|
import { CaseTypes } from "../../../data/CaseTypes";
|
||||||
import { Case } from "../../../data/entities/Case";
|
import { Case } from "../../../data/entities/Case";
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { GuildAuditLogs, User } from "discord.js";
|
import { GuildAuditLogs, User } from "discord.js";
|
||||||
import { userToConfigAccessibleUser } from "src/utils/configAccessibleObjects";
|
import { userToConfigAccessibleUser } from "../../../utils/configAccessibleObjects";
|
||||||
import { CaseTypes } from "../../../data/CaseTypes";
|
import { CaseTypes } from "../../../data/CaseTypes";
|
||||||
import { Case } from "../../../data/entities/Case";
|
import { Case } from "../../../data/entities/Case";
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { DiscordAPIError, Snowflake, User } from "discord.js";
|
import { DiscordAPIError, Snowflake, User } from "discord.js";
|
||||||
import humanizeDuration from "humanize-duration";
|
import humanizeDuration from "humanize-duration";
|
||||||
import { GuildPluginData } from "knub";
|
import { GuildPluginData } from "knub";
|
||||||
import { userToConfigAccessibleUser } from "src/utils/configAccessibleObjects";
|
import { userToConfigAccessibleUser } from "../../../utils/configAccessibleObjects";
|
||||||
import { CaseTypes } from "../../../data/CaseTypes";
|
import { CaseTypes } from "../../../data/CaseTypes";
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
import { logger } from "../../../logger";
|
import { logger } from "../../../logger";
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { Permissions, Snowflake } from "discord.js";
|
import { Permissions, Snowflake } from "discord.js";
|
||||||
import { GuildPluginData } from "knub";
|
import { GuildPluginData } from "knub";
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
import { isDiscordHTTPError, isDiscordAPIError, SECONDS, sleep } from "../../../utils";
|
import { isDiscordAPIError, isDiscordHTTPError, SECONDS, sleep } from "../../../utils";
|
||||||
import { hasDiscordPermissions } from "../../../utils/hasDiscordPermissions";
|
import { hasDiscordPermissions } from "../../../utils/hasDiscordPermissions";
|
||||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||||
import { ModActionsPluginType } from "../types";
|
import { ModActionsPluginType } from "../types";
|
||||||
|
|
|
@ -1,17 +1,10 @@
|
||||||
import { GuildMember } from "discord.js";
|
import { GuildMember } from "discord.js";
|
||||||
import { GuildPluginData } from "knub";
|
import { GuildPluginData } from "knub";
|
||||||
import { userToConfigAccessibleUser } from "src/utils/configAccessibleObjects";
|
import { userToConfigAccessibleUser } from "../../../utils/configAccessibleObjects";
|
||||||
import { CaseTypes } from "../../../data/CaseTypes";
|
import { CaseTypes } from "../../../data/CaseTypes";
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
import { renderTemplate } from "../../../templateFormatter";
|
import { renderTemplate } from "../../../templateFormatter";
|
||||||
import {
|
import { createUserNotificationError, notifyUser, resolveUser, ucfirst, UserNotificationResult } from "../../../utils";
|
||||||
createUserNotificationError,
|
|
||||||
notifyUser,
|
|
||||||
resolveUser,
|
|
||||||
stripObjectToScalars,
|
|
||||||
ucfirst,
|
|
||||||
UserNotificationResult,
|
|
||||||
} from "../../../utils";
|
|
||||||
import { CasesPlugin } from "../../Cases/CasesPlugin";
|
import { CasesPlugin } from "../../Cases/CasesPlugin";
|
||||||
import { IgnoredEventType, KickOptions, KickResult, ModActionsPluginType } from "../types";
|
import { IgnoredEventType, KickOptions, KickResult, ModActionsPluginType } from "../types";
|
||||||
import { getDefaultContactMethods } from "./getDefaultContactMethods";
|
import { getDefaultContactMethods } from "./getDefaultContactMethods";
|
||||||
|
|
|
@ -4,9 +4,9 @@ import { GuildPluginData } from "knub";
|
||||||
import moment from "moment-timezone";
|
import moment from "moment-timezone";
|
||||||
import { LogType } from "src/data/LogType";
|
import { LogType } from "src/data/LogType";
|
||||||
import { logger } from "src/logger";
|
import { logger } from "src/logger";
|
||||||
import { userToConfigAccessibleUser } from "src/utils/configAccessibleObjects";
|
import { userToConfigAccessibleUser } from "../../../utils/configAccessibleObjects";
|
||||||
import { CaseTypes } from "../../../data/CaseTypes";
|
import { CaseTypes } from "../../../data/CaseTypes";
|
||||||
import { resolveUser, SECONDS, stripObjectToScalars } from "../../../utils";
|
import { resolveUser, SECONDS } from "../../../utils";
|
||||||
import { CasesPlugin } from "../../Cases/CasesPlugin";
|
import { CasesPlugin } from "../../Cases/CasesPlugin";
|
||||||
import { IgnoredEventType, ModActionsPluginType } from "../types";
|
import { IgnoredEventType, ModActionsPluginType } from "../types";
|
||||||
import { formatReasonWithAttachments } from "./formatReasonWithAttachments";
|
import { formatReasonWithAttachments } from "./formatReasonWithAttachments";
|
||||||
|
|
|
@ -1,17 +1,10 @@
|
||||||
import { GuildMember, Snowflake } from "discord.js";
|
import { GuildMember, Snowflake } from "discord.js";
|
||||||
import { GuildPluginData } from "knub";
|
import { GuildPluginData } from "knub";
|
||||||
import { memberToConfigAccessibleMember, userToConfigAccessibleUser } from "src/utils/configAccessibleObjects";
|
import { memberToConfigAccessibleMember, userToConfigAccessibleUser } from "../../../utils/configAccessibleObjects";
|
||||||
import { CaseTypes } from "../../../data/CaseTypes";
|
import { CaseTypes } from "../../../data/CaseTypes";
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
import { renderTemplate } from "../../../templateFormatter";
|
import { renderTemplate } from "../../../templateFormatter";
|
||||||
import {
|
import { createUserNotificationError, notifyUser, resolveUser, ucfirst, UserNotificationResult } from "../../../utils";
|
||||||
createUserNotificationError,
|
|
||||||
notifyUser,
|
|
||||||
resolveUser,
|
|
||||||
stripObjectToScalars,
|
|
||||||
ucfirst,
|
|
||||||
UserNotificationResult,
|
|
||||||
} from "../../../utils";
|
|
||||||
import { waitForButtonConfirm } from "../../../utils/waitForInteraction";
|
import { waitForButtonConfirm } from "../../../utils/waitForInteraction";
|
||||||
import { CasesPlugin } from "../../Cases/CasesPlugin";
|
import { CasesPlugin } from "../../Cases/CasesPlugin";
|
||||||
import { ModActionsPluginType, WarnOptions, WarnResult } from "../types";
|
import { ModActionsPluginType, WarnOptions, WarnResult } from "../types";
|
||||||
|
|
|
@ -3,7 +3,7 @@ import moment from "moment-timezone";
|
||||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||||
import { humanizeDurationShort } from "../../../humanizeDurationShort";
|
import { humanizeDurationShort } from "../../../humanizeDurationShort";
|
||||||
import { getBaseUrl } from "../../../pluginUtils";
|
import { getBaseUrl } from "../../../pluginUtils";
|
||||||
import { DBDateFormat, isFullMessage, MINUTES, noop, resolveMember } from "../../../utils";
|
import { DBDateFormat, MINUTES, resolveMember } from "../../../utils";
|
||||||
import { IMuteWithDetails, mutesCmd } from "../types";
|
import { IMuteWithDetails, mutesCmd } from "../types";
|
||||||
|
|
||||||
export const MutesCmd = mutesCmd({
|
export const MutesCmd = mutesCmd({
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import { Snowflake } from "discord.js";
|
import { Snowflake } from "discord.js";
|
||||||
import { memberToConfigAccessibleMember } from "src/utils/configAccessibleObjects";
|
import { memberToConfigAccessibleMember } from "../../../utils/configAccessibleObjects";
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
import { stripObjectToScalars } from "../../../utils";
|
|
||||||
import { memberRolesLock } from "../../../utils/lockNameHelpers";
|
import { memberRolesLock } from "../../../utils/lockNameHelpers";
|
||||||
import { mutesEvt } from "../types";
|
import { mutesEvt } from "../types";
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import { Snowflake } from "discord.js";
|
import { Snowflake } from "discord.js";
|
||||||
import { GuildPluginData } from "knub";
|
import { GuildPluginData } from "knub";
|
||||||
import { memberToConfigAccessibleMember } from "src/utils/configAccessibleObjects";
|
import { memberToConfigAccessibleMember } from "../../../utils/configAccessibleObjects";
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
import { resolveMember, stripObjectToScalars, UnknownUser } from "../../../utils";
|
import { resolveMember, UnknownUser } from "../../../utils";
|
||||||
import { memberRolesLock } from "../../../utils/lockNameHelpers";
|
import { memberRolesLock } from "../../../utils/lockNameHelpers";
|
||||||
import { MutesPluginType } from "../types";
|
import { MutesPluginType } from "../types";
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { Snowflake, TextChannel, User } from "discord.js";
|
import { Snowflake, TextChannel, User } from "discord.js";
|
||||||
import humanizeDuration from "humanize-duration";
|
import humanizeDuration from "humanize-duration";
|
||||||
import { GuildPluginData } from "knub";
|
import { GuildPluginData } from "knub";
|
||||||
import { userToConfigAccessibleUser } from "src/utils/configAccessibleObjects";
|
import { userToConfigAccessibleUser } from "../../../utils/configAccessibleObjects";
|
||||||
import { CaseTypes } from "../../../data/CaseTypes";
|
import { CaseTypes } from "../../../data/CaseTypes";
|
||||||
import { Case } from "../../../data/entities/Case";
|
import { Case } from "../../../data/entities/Case";
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
|
@ -12,7 +12,6 @@ import {
|
||||||
notifyUser,
|
notifyUser,
|
||||||
resolveMember,
|
resolveMember,
|
||||||
resolveUser,
|
resolveUser,
|
||||||
stripObjectToScalars,
|
|
||||||
ucfirst,
|
ucfirst,
|
||||||
UserNotificationMethod,
|
UserNotificationMethod,
|
||||||
UserNotificationResult,
|
UserNotificationResult,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import { Snowflake } from "discord.js";
|
import { Snowflake } from "discord.js";
|
||||||
import humanizeDuration from "humanize-duration";
|
import humanizeDuration from "humanize-duration";
|
||||||
import { GuildPluginData } from "knub";
|
import { GuildPluginData } from "knub";
|
||||||
import { userToConfigAccessibleUser } from "src/utils/configAccessibleObjects";
|
import { userToConfigAccessibleUser } from "../../../utils/configAccessibleObjects";
|
||||||
import { CaseTypes } from "../../../data/CaseTypes";
|
import { CaseTypes } from "../../../data/CaseTypes";
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
import { resolveMember, resolveUser, stripObjectToScalars } from "../../../utils";
|
import { resolveMember, resolveUser } from "../../../utils";
|
||||||
import { memberRolesLock } from "../../../utils/lockNameHelpers";
|
import { memberRolesLock } from "../../../utils/lockNameHelpers";
|
||||||
import { CasesPlugin } from "../../Cases/CasesPlugin";
|
import { CasesPlugin } from "../../Cases/CasesPlugin";
|
||||||
import { CaseArgs } from "../../Cases/types";
|
import { CaseArgs } from "../../Cases/types";
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
import { GuildMemberEditData, Permissions } from "discord.js";
|
import { GuildMemberEditData, Permissions } from "discord.js";
|
||||||
import intersection from "lodash.intersection";
|
import intersection from "lodash.intersection";
|
||||||
import { memberToConfigAccessibleMember } from "src/utils/configAccessibleObjects";
|
import { memberToConfigAccessibleMember } from "../../../utils/configAccessibleObjects";
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
import { stripObjectToScalars } from "../../../utils";
|
|
||||||
import { canAssignRole } from "../../../utils/canAssignRole";
|
import { canAssignRole } from "../../../utils/canAssignRole";
|
||||||
import { getMissingPermissions } from "../../../utils/getMissingPermissions";
|
import { getMissingPermissions } from "../../../utils/getMissingPermissions";
|
||||||
import { memberRolesLock } from "../../../utils/lockNameHelpers";
|
import { memberRolesLock } from "../../../utils/lockNameHelpers";
|
||||||
|
|
|
@ -2,10 +2,10 @@ import { Channel, Message, TextChannel } from "discord.js";
|
||||||
import humanizeDuration from "humanize-duration";
|
import humanizeDuration from "humanize-duration";
|
||||||
import { GuildPluginData } from "knub";
|
import { GuildPluginData } from "knub";
|
||||||
import moment from "moment-timezone";
|
import moment from "moment-timezone";
|
||||||
import { channelToConfigAccessibleChannel, userToConfigAccessibleUser } from "src/utils/configAccessibleObjects";
|
import { channelToConfigAccessibleChannel, userToConfigAccessibleUser } from "../../../utils/configAccessibleObjects";
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
import { sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
import { sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
||||||
import { DBDateFormat, errorMessage, MINUTES, StrictMessageContent, stripObjectToScalars } from "../../../utils";
|
import { DBDateFormat, errorMessage, MINUTES, StrictMessageContent } from "../../../utils";
|
||||||
import { TimeAndDatePlugin } from "../../TimeAndDate/TimeAndDatePlugin";
|
import { TimeAndDatePlugin } from "../../TimeAndDate/TimeAndDatePlugin";
|
||||||
import { PostPluginType } from "../types";
|
import { PostPluginType } from "../types";
|
||||||
import { parseScheduleTime } from "./parseScheduleTime";
|
import { parseScheduleTime } from "./parseScheduleTime";
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import { Snowflake, TextChannel, User } from "discord.js";
|
import { Snowflake, TextChannel, User } from "discord.js";
|
||||||
import { GuildPluginData } from "knub";
|
import { GuildPluginData } from "knub";
|
||||||
import moment from "moment-timezone";
|
import moment from "moment-timezone";
|
||||||
import { channelToConfigAccessibleChannel, userToConfigAccessibleUser } from "src/utils/configAccessibleObjects";
|
import { channelToConfigAccessibleChannel, userToConfigAccessibleUser } from "../../../utils/configAccessibleObjects";
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
import { logger } from "../../../logger";
|
import { logger } from "../../../logger";
|
||||||
import { DBDateFormat, SECONDS, stripObjectToScalars } from "../../../utils";
|
import { DBDateFormat, SECONDS } from "../../../utils";
|
||||||
import { PostPluginType } from "../types";
|
import { PostPluginType } from "../types";
|
||||||
import { postMessage } from "./postMessage";
|
import { postMessage } from "./postMessage";
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import { PluginOptions } from "knub";
|
import { PluginOptions } from "knub";
|
||||||
import { ConfigPreprocessorFn } from "knub/dist/config/configTypes";
|
import { ConfigPreprocessorFn } from "knub/dist/config/configTypes";
|
||||||
import { GuildButtonRoles } from "../../data/GuildButtonRoles";
|
import { GuildButtonRoles } from "../../data/GuildButtonRoles";
|
||||||
import { isValidSnowflake } from "../../utils";
|
|
||||||
import { StrictValidationError } from "../../validatorUtils";
|
|
||||||
import { GuildReactionRoles } from "../../data/GuildReactionRoles";
|
import { GuildReactionRoles } from "../../data/GuildReactionRoles";
|
||||||
import { GuildSavedMessages } from "../../data/GuildSavedMessages";
|
import { GuildSavedMessages } from "../../data/GuildSavedMessages";
|
||||||
import { Queue } from "../../Queue";
|
import { Queue } from "../../Queue";
|
||||||
|
import { isValidSnowflake } from "../../utils";
|
||||||
|
import { StrictValidationError } from "../../validatorUtils";
|
||||||
import { LogsPlugin } from "../Logs/LogsPlugin";
|
import { LogsPlugin } from "../Logs/LogsPlugin";
|
||||||
import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint";
|
import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint";
|
||||||
import { ClearReactionRolesCmd } from "./commands/ClearReactionRolesCmd";
|
import { ClearReactionRolesCmd } from "./commands/ClearReactionRolesCmd";
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { MessageActionRow, MessageButton, Snowflake, TextChannel } from "discord.js";
|
import { createHash } from "crypto";
|
||||||
|
import { MessageButton, Snowflake } from "discord.js";
|
||||||
|
import moment from "moment";
|
||||||
import { sendErrorMessage, sendSuccessMessage } from "src/pluginUtils";
|
import { sendErrorMessage, sendSuccessMessage } from "src/pluginUtils";
|
||||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||||
import { reactionRolesCmd } from "../types";
|
import { reactionRolesCmd } from "../types";
|
||||||
import { createHash } from "crypto";
|
|
||||||
import moment from "moment";
|
|
||||||
import { splitButtonsIntoRows } from "../util/splitButtonsIntoRows";
|
import { splitButtonsIntoRows } from "../util/splitButtonsIntoRows";
|
||||||
|
|
||||||
export const PostButtonRolesCmd = reactionRolesCmd({
|
export const PostButtonRolesCmd = reactionRolesCmd({
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { MessageComponentInteraction } from "discord.js";
|
import { MessageComponentInteraction } from "discord.js";
|
||||||
|
import humanizeDuration from "humanize-duration";
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
import { LogType } from "src/data/LogType";
|
import { LogType } from "src/data/LogType";
|
||||||
import { logger } from "src/logger";
|
import { logger } from "src/logger";
|
||||||
|
@ -6,10 +7,9 @@ import { LogsPlugin } from "src/plugins/Logs/LogsPlugin";
|
||||||
import { MINUTES } from "src/utils";
|
import { MINUTES } from "src/utils";
|
||||||
import { idToTimestamp } from "src/utils/idToTimestamp";
|
import { idToTimestamp } from "src/utils/idToTimestamp";
|
||||||
import { reactionRolesEvt } from "../types";
|
import { reactionRolesEvt } from "../types";
|
||||||
import { resolveStatefulCustomId, BUTTON_CONTEXT_SEPARATOR } from "../util/buttonCustomIdFunctions";
|
|
||||||
import { ButtonMenuActions } from "../util/buttonMenuActions";
|
|
||||||
import humanizeDuration from "humanize-duration";
|
|
||||||
import { handleModifyRole, handleOpenMenu } from "../util/buttonActionHandlers";
|
import { handleModifyRole, handleOpenMenu } from "../util/buttonActionHandlers";
|
||||||
|
import { BUTTON_CONTEXT_SEPARATOR, resolveStatefulCustomId } from "../util/buttonCustomIdFunctions";
|
||||||
|
import { ButtonMenuActions } from "../util/buttonMenuActions";
|
||||||
|
|
||||||
const BUTTON_INVALIDATION_TIME = 15 * MINUTES;
|
const BUTTON_INVALIDATION_TIME = 15 * MINUTES;
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import * as t from "io-ts";
|
import * as t from "io-ts";
|
||||||
import { BasePluginType, typedGuildCommand, typedGuildEventListener } from "knub";
|
import { BasePluginType, typedGuildCommand, typedGuildEventListener } from "knub";
|
||||||
import { GuildButtonRoles } from "src/data/GuildButtonRoles";
|
import { GuildButtonRoles } from "src/data/GuildButtonRoles";
|
||||||
import { tNullable } from "../../utils";
|
|
||||||
import { GuildReactionRoles } from "../../data/GuildReactionRoles";
|
import { GuildReactionRoles } from "../../data/GuildReactionRoles";
|
||||||
import { GuildSavedMessages } from "../../data/GuildSavedMessages";
|
import { GuildSavedMessages } from "../../data/GuildSavedMessages";
|
||||||
import { Queue } from "../../Queue";
|
import { Queue } from "../../Queue";
|
||||||
|
import { tNullable } from "../../utils";
|
||||||
|
|
||||||
// These need to be updated every time discord adds/removes a style,
|
// These need to be updated every time discord adds/removes a style,
|
||||||
// but i cant figure out how to import MessageButtonStyles at runtime
|
// but i cant figure out how to import MessageButtonStyles at runtime
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { MessageButton, MessageActionRow, MessageComponentInteraction, Snowflake } from "discord.js";
|
import { MessageButton, MessageComponentInteraction, Snowflake } from "discord.js";
|
||||||
import { GuildPluginData } from "knub";
|
import { GuildPluginData } from "knub";
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
import { LogsPlugin } from "../../../plugins/Logs/LogsPlugin";
|
import { LogsPlugin } from "../../../plugins/Logs/LogsPlugin";
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { GuildChannel } from "discord.js";
|
import { GuildChannel } from "discord.js";
|
||||||
import { memberToConfigAccessibleMember, userToConfigAccessibleUser } from "src/utils/configAccessibleObjects";
|
import { memberToConfigAccessibleMember, userToConfigAccessibleUser } from "../../../utils/configAccessibleObjects";
|
||||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
import { canActOn, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
import { canActOn, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
||||||
import { resolveRoleId, stripObjectToScalars, verboseUserMention } from "../../../utils";
|
import { resolveRoleId, verboseUserMention } from "../../../utils";
|
||||||
import { rolesCmd } from "../types";
|
import { rolesCmd } from "../types";
|
||||||
|
|
||||||
export const AddRoleCmd = rolesCmd({
|
export const AddRoleCmd = rolesCmd({
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import { GuildMember } from "discord.js";
|
import { GuildMember } from "discord.js";
|
||||||
import { memberToConfigAccessibleMember, userToConfigAccessibleUser } from "src/utils/configAccessibleObjects";
|
import { memberToConfigAccessibleMember, userToConfigAccessibleUser } from "../../../utils/configAccessibleObjects";
|
||||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
import { logger } from "../../../logger";
|
import { logger } from "../../../logger";
|
||||||
import { canActOn, sendErrorMessage } from "../../../pluginUtils";
|
import { canActOn, sendErrorMessage } from "../../../pluginUtils";
|
||||||
import { resolveMember, resolveRoleId, stripObjectToScalars, successMessage } from "../../../utils";
|
import { resolveMember, resolveRoleId, successMessage } from "../../../utils";
|
||||||
import { rolesCmd } from "../types";
|
import { rolesCmd } from "../types";
|
||||||
|
|
||||||
export const MassAddRoleCmd = rolesCmd({
|
export const MassAddRoleCmd = rolesCmd({
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import { GuildMember } from "discord.js";
|
import { GuildMember } from "discord.js";
|
||||||
import { memberToConfigAccessibleMember, userToConfigAccessibleUser } from "src/utils/configAccessibleObjects";
|
import { memberToConfigAccessibleMember, userToConfigAccessibleUser } from "../../../utils/configAccessibleObjects";
|
||||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
import { logger } from "../../../logger";
|
import { logger } from "../../../logger";
|
||||||
import { canActOn, sendErrorMessage } from "../../../pluginUtils";
|
import { canActOn, sendErrorMessage } from "../../../pluginUtils";
|
||||||
import { resolveMember, resolveRoleId, stripObjectToScalars, successMessage } from "../../../utils";
|
import { resolveMember, resolveRoleId, successMessage } from "../../../utils";
|
||||||
import { rolesCmd } from "../types";
|
import { rolesCmd } from "../types";
|
||||||
|
|
||||||
export const MassRemoveRoleCmd = rolesCmd({
|
export const MassRemoveRoleCmd = rolesCmd({
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { GuildChannel } from "discord.js";
|
import { GuildChannel } from "discord.js";
|
||||||
import { memberToConfigAccessibleMember, userToConfigAccessibleUser } from "src/utils/configAccessibleObjects";
|
import { memberToConfigAccessibleMember, userToConfigAccessibleUser } from "../../../utils/configAccessibleObjects";
|
||||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
import { canActOn, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
import { canActOn, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
||||||
import { resolveRoleId, stripObjectToScalars, verboseUserMention } from "../../../utils";
|
import { resolveRoleId, verboseUserMention } from "../../../utils";
|
||||||
import { rolesCmd } from "../types";
|
import { rolesCmd } from "../types";
|
||||||
|
|
||||||
export const RemoveRoleCmd = rolesCmd({
|
export const RemoveRoleCmd = rolesCmd({
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { GuildChannel, Permissions, Snowflake, TextChannel } from "discord.js";
|
import { GuildChannel, Snowflake, TextChannel } from "discord.js";
|
||||||
import { GuildPluginData } from "knub";
|
import { GuildPluginData } from "knub";
|
||||||
import { channelToConfigAccessibleChannel, userToConfigAccessibleUser } from "src/utils/configAccessibleObjects";
|
import { channelToConfigAccessibleChannel, userToConfigAccessibleUser } from "../../../utils/configAccessibleObjects";
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
import { logger } from "../../../logger";
|
import { logger } from "../../../logger";
|
||||||
import { isDiscordAPIError, stripObjectToScalars, UnknownUser } from "../../../utils";
|
import { isDiscordAPIError, UnknownUser } from "../../../utils";
|
||||||
import { SlowmodePluginType } from "../types";
|
import { SlowmodePluginType } from "../types";
|
||||||
|
|
||||||
export async function applyBotSlowmodeToUserId(
|
export async function applyBotSlowmodeToUserId(
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { GuildChannel, Snowflake, TextChannel, ThreadChannel } from "discord.js";
|
import { Snowflake, TextChannel } from "discord.js";
|
||||||
import { GuildPluginData } from "knub";
|
import { GuildPluginData } from "knub";
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
import { SlowmodePluginType } from "../types";
|
import { SlowmodePluginType } from "../types";
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { GuildChannel, Snowflake, TextChannel } from "discord.js";
|
import { GuildChannel, Snowflake, TextChannel } from "discord.js";
|
||||||
import { GuildPluginData } from "knub";
|
import { GuildPluginData } from "knub";
|
||||||
import { channelToConfigAccessibleChannel, userToConfigAccessibleUser } from "src/utils/configAccessibleObjects";
|
import { channelToConfigAccessibleChannel, userToConfigAccessibleUser } from "../../../utils/configAccessibleObjects";
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
import { logger } from "../../../logger";
|
import { logger } from "../../../logger";
|
||||||
import { stripObjectToScalars, UnknownUser } from "../../../utils";
|
import { UnknownUser } from "../../../utils";
|
||||||
import { SlowmodePluginType } from "../types";
|
import { SlowmodePluginType } from "../types";
|
||||||
import { clearBotSlowmodeFromUserId } from "./clearBotSlowmodeFromUserId";
|
import { clearBotSlowmodeFromUserId } from "./clearBotSlowmodeFromUserId";
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { GuildChannel, TextChannel, ThreadChannel } from "discord.js";
|
import { TextChannel } from "discord.js";
|
||||||
import { GuildPluginData } from "knub";
|
import { GuildPluginData } from "knub";
|
||||||
import { SlowmodePluginType } from "../types";
|
import { SlowmodePluginType } from "../types";
|
||||||
import { clearBotSlowmodeFromUserId } from "./clearBotSlowmodeFromUserId";
|
import { clearBotSlowmodeFromUserId } from "./clearBotSlowmodeFromUserId";
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
import { Snowflake, TextChannel } from "discord.js";
|
import { Snowflake, TextChannel } from "discord.js";
|
||||||
import { GuildPluginData } from "knub";
|
import { GuildPluginData } from "knub";
|
||||||
import moment from "moment-timezone";
|
import moment from "moment-timezone";
|
||||||
import { channelToConfigAccessibleChannel, memberToConfigAccessibleMember } from "src/utils/configAccessibleObjects";
|
import {
|
||||||
|
channelToConfigAccessibleChannel,
|
||||||
|
memberToConfigAccessibleMember,
|
||||||
|
} from "../../../utils/configAccessibleObjects";
|
||||||
import { CaseTypes } from "../../../data/CaseTypes";
|
import { CaseTypes } from "../../../data/CaseTypes";
|
||||||
import { SavedMessage } from "../../../data/entities/SavedMessage";
|
import { SavedMessage } from "../../../data/entities/SavedMessage";
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
|
@ -10,14 +13,7 @@ import { CasesPlugin } from "../../../plugins/Cases/CasesPlugin";
|
||||||
import { MutesPlugin } from "../../../plugins/Mutes/MutesPlugin";
|
import { MutesPlugin } from "../../../plugins/Mutes/MutesPlugin";
|
||||||
import { MuteResult } from "../../../plugins/Mutes/types";
|
import { MuteResult } from "../../../plugins/Mutes/types";
|
||||||
import { ERRORS, RecoverablePluginError } from "../../../RecoverablePluginError";
|
import { ERRORS, RecoverablePluginError } from "../../../RecoverablePluginError";
|
||||||
import {
|
import { convertDelayStringToMS, DBDateFormat, noop, resolveMember, trimLines } from "../../../utils";
|
||||||
convertDelayStringToMS,
|
|
||||||
DBDateFormat,
|
|
||||||
noop,
|
|
||||||
resolveMember,
|
|
||||||
stripObjectToScalars,
|
|
||||||
trimLines,
|
|
||||||
} from "../../../utils";
|
|
||||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||||
import { RecentActionType, SpamPluginType, TBaseSingleSpamConfig } from "../types";
|
import { RecentActionType, SpamPluginType, TBaseSingleSpamConfig } from "../types";
|
||||||
import { addRecentAction } from "./addRecentAction";
|
import { addRecentAction } from "./addRecentAction";
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import { GuildPluginData } from "knub";
|
import { GuildPluginData } from "knub";
|
||||||
import { memberToConfigAccessibleMember } from "src/utils/configAccessibleObjects";
|
import { memberToConfigAccessibleMember } from "../../../utils/configAccessibleObjects";
|
||||||
import { CaseTypes } from "../../../data/CaseTypes";
|
import { CaseTypes } from "../../../data/CaseTypes";
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
import { CasesPlugin } from "../../../plugins/Cases/CasesPlugin";
|
import { CasesPlugin } from "../../../plugins/Cases/CasesPlugin";
|
||||||
import { MutesPlugin } from "../../../plugins/Mutes/MutesPlugin";
|
import { MutesPlugin } from "../../../plugins/Mutes/MutesPlugin";
|
||||||
import { ERRORS, RecoverablePluginError } from "../../../RecoverablePluginError";
|
import { ERRORS, RecoverablePluginError } from "../../../RecoverablePluginError";
|
||||||
import { convertDelayStringToMS, resolveMember, stripObjectToScalars } from "../../../utils";
|
import { convertDelayStringToMS, resolveMember } from "../../../utils";
|
||||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||||
import { RecentActionType, SpamPluginType } from "../types";
|
import { RecentActionType, SpamPluginType } from "../types";
|
||||||
import { addRecentAction } from "./addRecentAction";
|
import { addRecentAction } from "./addRecentAction";
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
import { memberToConfigAccessibleMember, userToConfigAccessibleUser } from "src/utils/configAccessibleObjects";
|
import { memberToConfigAccessibleMember, userToConfigAccessibleUser } from "../../../utils/configAccessibleObjects";
|
||||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||||
import { sendErrorMessage } from "../../../pluginUtils";
|
import { sendErrorMessage } from "../../../pluginUtils";
|
||||||
import { TemplateParseError } from "../../../templateFormatter";
|
import { TemplateParseError } from "../../../templateFormatter";
|
||||||
import { stripObjectToScalars } from "../../../utils";
|
|
||||||
import { tagsCmd } from "../types";
|
import { tagsCmd } from "../types";
|
||||||
import { renderTagBody } from "../util/renderTagBody";
|
import { renderTagBody } from "../util/renderTagBody";
|
||||||
|
|
||||||
|
|
|
@ -2,10 +2,10 @@ import { GuildMember } from "discord.js";
|
||||||
import * as t from "io-ts";
|
import * as t from "io-ts";
|
||||||
import { GuildPluginData } from "knub";
|
import { GuildPluginData } from "knub";
|
||||||
import { parseArguments } from "knub-command-manager";
|
import { parseArguments } from "knub-command-manager";
|
||||||
import { memberToConfigAccessibleMember, userToConfigAccessibleUser } from "src/utils/configAccessibleObjects";
|
import { memberToConfigAccessibleMember, userToConfigAccessibleUser } from "../../../utils/configAccessibleObjects";
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
import { TemplateParseError } from "../../../templateFormatter";
|
import { TemplateParseError } from "../../../templateFormatter";
|
||||||
import { StrictMessageContent, stripObjectToScalars } from "../../../utils";
|
import { StrictMessageContent } from "../../../utils";
|
||||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||||
import { Tag, TagsPluginType } from "../types";
|
import { Tag, TagsPluginType } from "../types";
|
||||||
import { renderTagBody } from "./renderTagBody";
|
import { renderTagBody } from "./renderTagBody";
|
||||||
|
|
|
@ -4,7 +4,7 @@ import LCL from "last-commit-log";
|
||||||
import moment from "moment-timezone";
|
import moment from "moment-timezone";
|
||||||
import { rootDir } from "../../../paths";
|
import { rootDir } from "../../../paths";
|
||||||
import { getCurrentUptime } from "../../../uptime";
|
import { getCurrentUptime } from "../../../uptime";
|
||||||
import { EmbedWith, multiSorter, resolveMember, sorter } from "../../../utils";
|
import { multiSorter, resolveMember, sorter } from "../../../utils";
|
||||||
import { TimeAndDatePlugin } from "../../TimeAndDate/TimeAndDatePlugin";
|
import { TimeAndDatePlugin } from "../../TimeAndDate/TimeAndDatePlugin";
|
||||||
import { utilityCmd } from "../types";
|
import { utilityCmd } from "../types";
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
import { Message, Snowflake, TextChannel, User } from "discord.js";
|
import { Message, Snowflake, TextChannel, User } from "discord.js";
|
||||||
import { GuildPluginData } from "knub";
|
import { GuildPluginData } from "knub";
|
||||||
import moment from "moment-timezone";
|
import moment from "moment-timezone";
|
||||||
import { channelToConfigAccessibleChannel, userToConfigAccessibleUser } from "src/utils/configAccessibleObjects";
|
import { channelToConfigAccessibleChannel, userToConfigAccessibleUser } from "../../../utils/configAccessibleObjects";
|
||||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||||
import { SavedMessage } from "../../../data/entities/SavedMessage";
|
import { SavedMessage } from "../../../data/entities/SavedMessage";
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
import { ModActionsPlugin } from "../../../plugins/ModActions/ModActionsPlugin";
|
import { ModActionsPlugin } from "../../../plugins/ModActions/ModActionsPlugin";
|
||||||
import { getBaseUrl, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
import { getBaseUrl, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
||||||
import { allowTimeout } from "../../../RegExpRunner";
|
import { allowTimeout } from "../../../RegExpRunner";
|
||||||
import { DAYS, getInviteCodesInString, noop, SECONDS, stripObjectToScalars } from "../../../utils";
|
import { DAYS, getInviteCodesInString, noop, SECONDS } from "../../../utils";
|
||||||
import { utilityCmd, UtilityPluginType } from "../types";
|
import { utilityCmd, UtilityPluginType } from "../types";
|
||||||
|
|
||||||
const MAX_CLEAN_COUNT = 150;
|
const MAX_CLEAN_COUNT = 150;
|
||||||
|
|
|
@ -3,11 +3,10 @@ import {
|
||||||
channelToConfigAccessibleChannel,
|
channelToConfigAccessibleChannel,
|
||||||
memberToConfigAccessibleMember,
|
memberToConfigAccessibleMember,
|
||||||
userToConfigAccessibleUser,
|
userToConfigAccessibleUser,
|
||||||
} from "src/utils/configAccessibleObjects";
|
} from "../../../utils/configAccessibleObjects";
|
||||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
import { canActOn, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
import { canActOn, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
||||||
import { stripObjectToScalars } from "../../../utils";
|
|
||||||
import { utilityCmd } from "../types";
|
import { utilityCmd } from "../types";
|
||||||
|
|
||||||
export const VcdisconnectCmd = utilityCmd({
|
export const VcdisconnectCmd = utilityCmd({
|
||||||
|
|
|
@ -3,11 +3,11 @@ import {
|
||||||
channelToConfigAccessibleChannel,
|
channelToConfigAccessibleChannel,
|
||||||
memberToConfigAccessibleMember,
|
memberToConfigAccessibleMember,
|
||||||
userToConfigAccessibleUser,
|
userToConfigAccessibleUser,
|
||||||
} from "src/utils/configAccessibleObjects";
|
} from "../../../utils/configAccessibleObjects";
|
||||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
import { canActOn, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
import { canActOn, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
||||||
import { channelMentionRegex, isSnowflake, simpleClosestStringMatch, stripObjectToScalars } from "../../../utils";
|
import { channelMentionRegex, isSnowflake, simpleClosestStringMatch } from "../../../utils";
|
||||||
import { utilityCmd } from "../types";
|
import { utilityCmd } from "../types";
|
||||||
|
|
||||||
export const VcmoveCmd = utilityCmd({
|
export const VcmoveCmd = utilityCmd({
|
||||||
|
|
|
@ -3,7 +3,7 @@ import {
|
||||||
channelToConfigAccessibleChannel,
|
channelToConfigAccessibleChannel,
|
||||||
memberToConfigAccessibleMember,
|
memberToConfigAccessibleMember,
|
||||||
userToConfigAccessibleUser,
|
userToConfigAccessibleUser,
|
||||||
} from "src/utils/configAccessibleObjects";
|
} from "../../../utils/configAccessibleObjects";
|
||||||
import { LogType } from "../../../data/LogType";
|
import { LogType } from "../../../data/LogType";
|
||||||
import { renderTemplate, TemplateParseError } from "../../../templateFormatter";
|
import { renderTemplate, TemplateParseError } from "../../../templateFormatter";
|
||||||
import { createChunkedMessage, stripObjectToScalars } from "../../../utils";
|
import { createChunkedMessage, stripObjectToScalars } from "../../../utils";
|
||||||
|
|
|
@ -28,19 +28,19 @@ import { either } from "fp-ts/lib/Either";
|
||||||
import { unsafeCoerce } from "fp-ts/lib/function";
|
import { unsafeCoerce } from "fp-ts/lib/function";
|
||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
import https from "https";
|
import https from "https";
|
||||||
|
import humanizeDuration from "humanize-duration";
|
||||||
import * as t from "io-ts";
|
import * as t from "io-ts";
|
||||||
|
import { isEqual } from "lodash";
|
||||||
import moment from "moment-timezone";
|
import moment from "moment-timezone";
|
||||||
import tlds from "tlds";
|
import tlds from "tlds";
|
||||||
import tmp from "tmp";
|
import tmp from "tmp";
|
||||||
import { URL } from "url";
|
import { URL } from "url";
|
||||||
import { SavedMessage } from "./data/entities/SavedMessage";
|
import { SavedMessage } from "./data/entities/SavedMessage";
|
||||||
import { SimpleCache } from "./SimpleCache";
|
import { SimpleCache } from "./SimpleCache";
|
||||||
|
import { ChannelTypeStrings } from "./types";
|
||||||
import { sendDM } from "./utils/sendDM";
|
import { sendDM } from "./utils/sendDM";
|
||||||
import { waitForButtonConfirm } from "./utils/waitForInteraction";
|
import { waitForButtonConfirm } from "./utils/waitForInteraction";
|
||||||
import { decodeAndValidateStrict, StrictValidationError } from "./validatorUtils";
|
import { decodeAndValidateStrict, StrictValidationError } from "./validatorUtils";
|
||||||
import { isEqual } from "lodash";
|
|
||||||
import humanizeDuration from "humanize-duration";
|
|
||||||
import { ChannelTypeStrings } from "./types";
|
|
||||||
|
|
||||||
const fsp = fs.promises;
|
const fsp = fs.promises;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue