mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-06-08 00:05:01 +00:00
chore: esm imports
This will make merging this into 'next' much easier.
This commit is contained in:
parent
1f0c7a4349
commit
45e3fe2ef0
798 changed files with 3633 additions and 3633 deletions
|
@ -1,15 +1,15 @@
|
|||
import { PluginOptions, guildPlugin } from "knub";
|
||||
import { onGuildEvent } from "../../data/GuildEvents";
|
||||
import { GuildVCAlerts } from "../../data/GuildVCAlerts";
|
||||
import { CommonPlugin } from "../Common/CommonPlugin";
|
||||
import { FollowCmd } from "./commands/FollowCmd";
|
||||
import { DeleteFollowCmd, ListFollowCmd } from "./commands/ListFollowCmd";
|
||||
import { WhereCmd } from "./commands/WhereCmd";
|
||||
import { GuildBanRemoveAlertsEvt } from "./events/BanRemoveAlertsEvt";
|
||||
import { VoiceStateUpdateAlertEvt } from "./events/SendAlertsEvts";
|
||||
import { LocateUserPluginType, zLocateUserConfig } from "./types";
|
||||
import { clearExpiredAlert } from "./utils/clearExpiredAlert";
|
||||
import { fillActiveAlertsList } from "./utils/fillAlertsList";
|
||||
import { onGuildEvent } from "../../data/GuildEvents.js";
|
||||
import { GuildVCAlerts } from "../../data/GuildVCAlerts.js";
|
||||
import { CommonPlugin } from "../Common/CommonPlugin.js";
|
||||
import { FollowCmd } from "./commands/FollowCmd.js";
|
||||
import { DeleteFollowCmd, ListFollowCmd } from "./commands/ListFollowCmd.js";
|
||||
import { WhereCmd } from "./commands/WhereCmd.js";
|
||||
import { GuildBanRemoveAlertsEvt } from "./events/BanRemoveAlertsEvt.js";
|
||||
import { VoiceStateUpdateAlertEvt } from "./events/SendAlertsEvts.js";
|
||||
import { LocateUserPluginType, zLocateUserConfig } from "./types.js";
|
||||
import { clearExpiredAlert } from "./utils/clearExpiredAlert.js";
|
||||
import { fillActiveAlertsList } from "./utils/fillAlertsList.js";
|
||||
|
||||
const defaultOptions: PluginOptions<LocateUserPluginType> = {
|
||||
config: {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import humanizeDuration from "humanize-duration";
|
||||
import moment from "moment-timezone";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { registerExpiringVCAlert } from "../../../data/loops/expiringVCAlertsLoop";
|
||||
import { MINUTES, SECONDS } from "../../../utils";
|
||||
import { locateUserCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes.js";
|
||||
import { registerExpiringVCAlert } from "../../../data/loops/expiringVCAlertsLoop.js";
|
||||
import { MINUTES, SECONDS } from "../../../utils.js";
|
||||
import { locateUserCmd } from "../types.js";
|
||||
|
||||
export const FollowCmd = locateUserCmd({
|
||||
trigger: ["follow", "f"],
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { clearExpiringVCAlert } from "../../../data/loops/expiringVCAlertsLoop";
|
||||
import { createChunkedMessage, sorter } from "../../../utils";
|
||||
import { locateUserCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes.js";
|
||||
import { clearExpiringVCAlert } from "../../../data/loops/expiringVCAlertsLoop.js";
|
||||
import { createChunkedMessage, sorter } from "../../../utils.js";
|
||||
import { locateUserCmd } from "../types.js";
|
||||
|
||||
export const ListFollowCmd = locateUserCmd({
|
||||
trigger: ["follows", "fs"],
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { locateUserCmd } from "../types";
|
||||
import { sendWhere } from "../utils/sendWhere";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes.js";
|
||||
import { locateUserCmd } from "../types.js";
|
||||
import { sendWhere } from "../utils/sendWhere.js";
|
||||
|
||||
export const WhereCmd = locateUserCmd({
|
||||
trigger: ["where", "w"],
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { clearExpiringVCAlert } from "../../../data/loops/expiringVCAlertsLoop";
|
||||
import { locateUserEvt } from "../types";
|
||||
import { clearExpiringVCAlert } from "../../../data/loops/expiringVCAlertsLoop.js";
|
||||
import { locateUserEvt } from "../types.js";
|
||||
|
||||
export const GuildBanRemoveAlertsEvt = locateUserEvt({
|
||||
event: "guildBanAdd",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { Snowflake } from "discord.js";
|
||||
import { locateUserEvt } from "../types";
|
||||
import { sendAlerts } from "../utils/sendAlerts";
|
||||
import { locateUserEvt } from "../types.js";
|
||||
import { sendAlerts } from "../utils/sendAlerts.js";
|
||||
|
||||
export const VoiceStateUpdateAlertEvt = locateUserEvt({
|
||||
event: "voiceStateUpdate",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { ZeppelinPluginInfo } from "../../types";
|
||||
import { trimPluginDescription } from "../../utils";
|
||||
import { zLocateUserConfig } from "./types";
|
||||
import { ZeppelinPluginInfo } from "../../types.js";
|
||||
import { trimPluginDescription } from "../../utils.js";
|
||||
import { zLocateUserConfig } from "./types.js";
|
||||
|
||||
export const locateUserPluginInfo: ZeppelinPluginInfo = {
|
||||
prettyName: "Locate user",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { BasePluginType, guildPluginEventListener, guildPluginMessageCommand, pluginUtils } from "knub";
|
||||
import z from "zod";
|
||||
import { GuildVCAlerts } from "../../data/GuildVCAlerts";
|
||||
import { CommonPlugin } from "../Common/CommonPlugin";
|
||||
import { GuildVCAlerts } from "../../data/GuildVCAlerts.js";
|
||||
import { CommonPlugin } from "../Common/CommonPlugin.js";
|
||||
|
||||
export const zLocateUserConfig = z.strictObject({
|
||||
can_where: z.boolean(),
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { GuildPluginData } from "knub";
|
||||
import { VCAlert } from "../../../data/entities/VCAlert";
|
||||
import { LocateUserPluginType } from "../types";
|
||||
import { removeUserIdFromActiveAlerts } from "./removeUserIdFromActiveAlerts";
|
||||
import { VCAlert } from "../../../data/entities/VCAlert.js";
|
||||
import { LocateUserPluginType } from "../types.js";
|
||||
import { removeUserIdFromActiveAlerts } from "./removeUserIdFromActiveAlerts.js";
|
||||
|
||||
export async function clearExpiredAlert(pluginData: GuildPluginData<LocateUserPluginType>, alert: VCAlert) {
|
||||
await pluginData.state.alerts.delete(alert.id);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { GuildPluginData } from "knub";
|
||||
import { LocateUserPluginType } from "../types";
|
||||
import { LocateUserPluginType } from "../types.js";
|
||||
|
||||
export async function fillActiveAlertsList(pluginData: GuildPluginData<LocateUserPluginType>) {
|
||||
const allAlerts = await pluginData.state.alerts.getAllGuildAlerts();
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { GuildMember, GuildTextBasedChannel, Snowflake } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { LocateUserPluginType } from "../types";
|
||||
import { LocateUserPluginType } from "../types.js";
|
||||
|
||||
export async function moveMember(
|
||||
pluginData: GuildPluginData<LocateUserPluginType>,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { GuildPluginData } from "knub";
|
||||
import { LocateUserPluginType } from "../types";
|
||||
import { LocateUserPluginType } from "../types.js";
|
||||
|
||||
export async function removeUserIdFromActiveAlerts(pluginData: GuildPluginData<LocateUserPluginType>, userId: string) {
|
||||
const index = pluginData.state.usersWithAlerts.indexOf(userId);
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { Snowflake } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { resolveMember } from "../../../utils";
|
||||
import { LocateUserPluginType } from "../types";
|
||||
import { moveMember } from "./moveMember";
|
||||
import { sendWhere } from "./sendWhere";
|
||||
import { resolveMember } from "../../../utils.js";
|
||||
import { LocateUserPluginType } from "../types.js";
|
||||
import { moveMember } from "./moveMember.js";
|
||||
import { sendWhere } from "./sendWhere.js";
|
||||
|
||||
export async function sendAlerts(pluginData: GuildPluginData<LocateUserPluginType>, userId: string) {
|
||||
const triggeredAlerts = await pluginData.state.alerts.getAlertsByUserId(userId);
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { GuildMember, GuildTextBasedChannel, Invite, VoiceChannel } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { getInviteLink } from "knub/helpers";
|
||||
import { LocateUserPluginType } from "../types";
|
||||
import { createOrReuseInvite } from "./createOrReuseInvite";
|
||||
import { LocateUserPluginType } from "../types.js";
|
||||
import { createOrReuseInvite } from "./createOrReuseInvite.js";
|
||||
|
||||
export async function sendWhere(
|
||||
pluginData: GuildPluginData<LocateUserPluginType>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue