mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-14 13:55:03 +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,11 +1,11 @@
|
|||
import { PluginOptions, guildPlugin } from "knub";
|
||||
import z from "zod";
|
||||
import { Queue } from "../../Queue";
|
||||
import { Webhooks } from "../../data/Webhooks";
|
||||
import { makePublicFn } from "../../pluginUtils";
|
||||
import { editMessage } from "./functions/editMessage";
|
||||
import { sendMessage } from "./functions/sendMessage";
|
||||
import { InternalPosterPluginType } from "./types";
|
||||
import { Queue } from "../../Queue.js";
|
||||
import { Webhooks } from "../../data/Webhooks.js";
|
||||
import { makePublicFn } from "../../pluginUtils.js";
|
||||
import { editMessage } from "./functions/editMessage.js";
|
||||
import { sendMessage } from "./functions/sendMessage.js";
|
||||
import { InternalPosterPluginType } from "./types.js";
|
||||
|
||||
const defaultOptions: PluginOptions<InternalPosterPluginType> = {
|
||||
config: {},
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Message, MessageEditOptions, WebhookClient, WebhookMessageEditOptions } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { isDiscordAPIError, noop } from "../../../utils";
|
||||
import { InternalPosterPluginType } from "../types";
|
||||
import { isDiscordAPIError, noop } from "../../../utils.js";
|
||||
import { InternalPosterPluginType } from "../types.js";
|
||||
|
||||
/**
|
||||
* Sends a message using a webhook or direct API requests, preferring webhooks when possible.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { WebhookClient } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { InternalPosterPluginType } from "../types";
|
||||
import { getOrCreateWebhookForChannel, WebhookableChannel } from "./getOrCreateWebhookForChannel";
|
||||
import { InternalPosterPluginType } from "../types.js";
|
||||
import { getOrCreateWebhookForChannel, WebhookableChannel } from "./getOrCreateWebhookForChannel.js";
|
||||
|
||||
export async function getOrCreateWebhookClientForChannel(
|
||||
pluginData: GuildPluginData<InternalPosterPluginType>,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { GuildBasedChannel, PermissionsBitField } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { isDiscordAPIError } from "../../../utils";
|
||||
import { InternalPosterPluginType } from "../types";
|
||||
import { isDiscordAPIError } from "../../../utils.js";
|
||||
import { InternalPosterPluginType } from "../types.js";
|
||||
|
||||
type WebhookInfo = [id: string, token: string];
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { GuildTextBasedChannel, MessageCreateOptions, WebhookClient } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { isDiscordAPIError } from "../../../utils";
|
||||
import { InternalPosterPluginType } from "../types";
|
||||
import { getOrCreateWebhookClientForChannel } from "./getOrCreateWebhookClientForChannel";
|
||||
import { channelIsWebhookable } from "./getOrCreateWebhookForChannel";
|
||||
import { isDiscordAPIError } from "../../../utils.js";
|
||||
import { InternalPosterPluginType } from "../types.js";
|
||||
import { getOrCreateWebhookClientForChannel } from "./getOrCreateWebhookClientForChannel.js";
|
||||
import { channelIsWebhookable } from "./getOrCreateWebhookForChannel.js";
|
||||
|
||||
export type InternalPosterMessageResult = {
|
||||
id: string;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { ZeppelinPluginInfo } from "../../types";
|
||||
import { ZeppelinPluginInfo } from "../../types.js";
|
||||
|
||||
export const internalPosterPluginInfo: ZeppelinPluginInfo = {
|
||||
prettyName: "Internal poster",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { WebhookClient } from "discord.js";
|
||||
import { BasePluginType } from "knub";
|
||||
import { Queue } from "../../Queue";
|
||||
import { Webhooks } from "../../data/Webhooks";
|
||||
import { Queue } from "../../Queue.js";
|
||||
import { Webhooks } from "../../data/Webhooks.js";
|
||||
|
||||
export interface InternalPosterPluginType extends BasePluginType {
|
||||
state: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue