mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-07-08 03:27:20 +00:00
refactor: convert /backend to ESM
This commit is contained in:
parent
31d74c05aa
commit
5772e27cda
766 changed files with 3473 additions and 3500 deletions
|
@ -1,8 +1,8 @@
|
|||
import { CooldownManager, guildPlugin } from "knub";
|
||||
import { GuildLogs } from "../../data/GuildLogs";
|
||||
import { LogsPlugin } from "../Logs/LogsPlugin";
|
||||
import { VoiceStateUpdateEvt } from "./events/VoiceStateUpdateEvt";
|
||||
import { CompanionChannelsPluginType, zCompanionChannelsConfig } from "./types";
|
||||
import { GuildLogs } from "../../data/GuildLogs.js";
|
||||
import { LogsPlugin } from "../Logs/LogsPlugin.js";
|
||||
import { VoiceStateUpdateEvt } from "./events/VoiceStateUpdateEvt.js";
|
||||
import { CompanionChannelsPluginType, zCompanionChannelsConfig } from "./types.js";
|
||||
|
||||
const defaultOptions = {
|
||||
config: {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { handleCompanionPermissions } from "../functions/handleCompanionPermissions";
|
||||
import { companionChannelsEvt } from "../types";
|
||||
import { handleCompanionPermissions } from "../functions/handleCompanionPermissions.js";
|
||||
import { companionChannelsEvt } from "../types.js";
|
||||
|
||||
export const VoiceStateUpdateEvt = companionChannelsEvt({
|
||||
event: "voiceStateUpdate",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { StageChannel, VoiceChannel } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { CompanionChannelsPluginType, TCompanionChannelOpts } from "../types";
|
||||
import { CompanionChannelsPluginType, TCompanionChannelOpts } from "../types.js";
|
||||
|
||||
const defaultCompanionChannelOpts: Partial<TCompanionChannelOpts> = {
|
||||
enabled: true,
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import { PermissionsBitField, Snowflake, StageChannel, TextChannel, VoiceChannel } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { LogType } from "../../../data/LogType";
|
||||
import { MINUTES, isDiscordAPIError } from "../../../utils";
|
||||
import { filterObject } from "../../../utils/filterObject";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
import { CompanionChannelsPluginType, TCompanionChannelOpts } from "../types";
|
||||
import { getCompanionChannelOptsForVoiceChannelId } from "./getCompanionChannelOptsForVoiceChannelId";
|
||||
import { LogType } from "../../../data/LogType.js";
|
||||
import { MINUTES, isDiscordAPIError } from "../../../utils.js";
|
||||
import { filterObject } from "../../../utils/filterObject.js";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin.js";
|
||||
import { CompanionChannelsPluginType, TCompanionChannelOpts } from "../types.js";
|
||||
import { getCompanionChannelOptsForVoiceChannelId } from "./getCompanionChannelOptsForVoiceChannelId.js";
|
||||
|
||||
const ERROR_COOLDOWN_KEY = "errorCooldown";
|
||||
const ERROR_COOLDOWN = 5 * MINUTES;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { ZeppelinPluginInfo } from "../../types";
|
||||
import { trimPluginDescription } from "../../utils";
|
||||
import { ZeppelinPluginInfo } from "../../types.js";
|
||||
import { trimPluginDescription } from "../../utils.js";
|
||||
|
||||
export const companionChannelsPluginInfo: ZeppelinPluginInfo = {
|
||||
showInDocs: true,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { BasePluginType, CooldownManager, guildPluginEventListener } from "knub";
|
||||
import z from "zod";
|
||||
import { GuildLogs } from "../../data/GuildLogs";
|
||||
import { zBoundedCharacters, zSnowflake } from "../../utils";
|
||||
import { GuildLogs } from "../../data/GuildLogs.js";
|
||||
import { zBoundedCharacters, zSnowflake } from "../../utils.js";
|
||||
|
||||
export const zCompanionChannelOpts = z.strictObject({
|
||||
voice_channel_ids: z.array(zSnowflake),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue