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,6 +1,6 @@
|
|||
import { readChannelPermissions } from "./readChannelPermissions";
|
||||
import { getMissingChannelPermissions } from "./getMissingChannelPermissions";
|
||||
import { GuildChannel, GuildMember } from "discord.js";
|
||||
import { getMissingChannelPermissions } from "./getMissingChannelPermissions";
|
||||
import { readChannelPermissions } from "./readChannelPermissions";
|
||||
|
||||
export function canReadChannel(channel: GuildChannel, member: GuildMember) {
|
||||
// Not missing permissions required to read the channel = can read channel
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
import {
|
||||
APIMessage,
|
||||
Client,
|
||||
Message,
|
||||
MessageOptions,
|
||||
MessageReaction,
|
||||
PartialUser,
|
||||
TextChannel,
|
||||
User,
|
||||
Client,
|
||||
Message,
|
||||
MessageOptions,
|
||||
MessageReaction,
|
||||
PartialUser,
|
||||
TextChannel,
|
||||
User
|
||||
} from "discord.js";
|
||||
import { Awaitable } from "knub/dist/utils";
|
||||
import { MINUTES, noop } from "../utils";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import test from "ava";
|
||||
import { decrypt, encrypt } from "./crypt";
|
||||
|
||||
import { encrypt, decrypt } from "./crypt";
|
||||
|
||||
test("encrypt() followed by decrypt()", t => {
|
||||
const original = "banana 123 👀 💕"; // Includes emojis to verify utf8 stuff works
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import crypto from "crypto";
|
||||
import "../loadEnv";
|
||||
|
||||
import crypto, { DecipherGCM } from "crypto";
|
||||
|
||||
if (!process.env.KEY) {
|
||||
// tslint:disable-next-line:no-console
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { GuildMember, GuildChannel } from "discord.js";
|
||||
import { GuildChannel, GuildMember } from "discord.js";
|
||||
import { getMissingPermissions } from "./getMissingPermissions";
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { PermissionOverwrites, Permissions } from "discord.js";
|
||||
import { Permissions } from "discord.js";
|
||||
|
||||
/**
|
||||
* @param resolvedPermissions A Permission object from e.g. GuildChannel#permissionsFor() or Member#permission
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import moment from "moment-timezone";
|
||||
import escapeStringRegexp from "escape-string-regexp";
|
||||
import moment from "moment-timezone";
|
||||
|
||||
const normalizeTzName = str => str.replace(/[^a-zA-Z0-9+\-]/g, "").toLowerCase();
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { disableInlineCode, isSnowflake } from "../utils";
|
||||
import { getChannelIdFromMessageId } from "../data/getChannelIdFromMessageId";
|
||||
import { GuildPluginData, TypeConversionError } from "knub";
|
||||
import { TextChannel } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { getChannelIdFromMessageId } from "../data/getChannelIdFromMessageId";
|
||||
import { isSnowflake } from "../utils";
|
||||
|
||||
const channelAndMessageIdRegex = /^(\d+)[\-\/](\d+)$/;
|
||||
const messageLinkRegex = /^https:\/\/(?:\w+\.)?discord(?:app)?\.com\/channels\/\d+\/(\d+)\/(\d+)$/i;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { GuildPluginData } from "knub";
|
||||
import { LogType } from "../data/LogType";
|
||||
import { LogsPlugin } from "../plugins/Logs/LogsPlugin";
|
||||
import { findRelevantAuditLogEntry, isDiscordRESTError } from "../utils";
|
||||
import { LogType } from "../data/LogType";
|
||||
|
||||
/**
|
||||
* Wrapper for findRelevantAuditLogEntry() that handles permission errors gracefully.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { createChunkedMessage, HOURS, isDiscordRESTError } from "../utils";
|
||||
import { logger } from "../logger";
|
||||
import Timeout = NodeJS.Timeout;
|
||||
import { APIMessage, User } from "discord.js";
|
||||
import { logger } from "../logger";
|
||||
import { createChunkedMessage, HOURS, isDiscordRESTError } from "../utils";
|
||||
import Timeout = NodeJS.Timeout;
|
||||
|
||||
let dmsDisabled = false;
|
||||
let dmsDisabledTimeout: Timeout;
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
import * as t from "io-ts";
|
||||
import { either } from "fp-ts/lib/Either";
|
||||
import { convertDelayStringToMS } from "../utils";
|
||||
import * as t from "io-ts";
|
||||
import { intToRgb } from "./intToRgb";
|
||||
import { parseColor } from "./parseColor";
|
||||
import { rgbToInt } from "./rgbToInt";
|
||||
import { intToRgb } from "./intToRgb";
|
||||
|
||||
export const tColor = new t.Type<number, string>(
|
||||
"tColor",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as t from "io-ts";
|
||||
import { either } from "fp-ts/lib/Either";
|
||||
import * as t from "io-ts";
|
||||
import { isValidTimezone } from "./isValidTimezone";
|
||||
|
||||
export const tValidTimezone = new t.Type<string, string>(
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
import {
|
||||
TextChannel,
|
||||
MessageActionRow,
|
||||
MessageOptions,
|
||||
MessageButton,
|
||||
Client,
|
||||
Interaction,
|
||||
MessageComponentInteraction,
|
||||
MessageActionRow,
|
||||
|
||||
MessageButton,
|
||||
|
||||
|
||||
MessageComponentInteraction, MessageOptions, TextChannel
|
||||
} from "discord.js";
|
||||
import { PluginError } from "knub";
|
||||
import { noop } from "knub/dist/utils";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue