Use import everywhere, goofy

This commit is contained in:
Christopher Cookman 2025-10-28 07:26:25 -06:00
parent 5bbb4bf764
commit 0ddf6dac99
2 changed files with 6 additions and 5 deletions

View file

@ -1,6 +1,7 @@
require("dotenv").config({ quiet: true });
const AMI = import("ami").AMISocket
const sock = new AMI({
import dotenv from 'dotenv';
dotenv.config({quiet: true})
import AMISocket from 'ami';
const sock = new AMISocket({
connect: {
host: '127.0.0.1',
port: 5038
@ -11,7 +12,7 @@ const sock = new AMI({
},
events: true
})
const Discord = require("discord.js");
import Discord from 'discord.js';
const hook = new Discord.WebhookClient({ url: process.env.DISCORD_WEBHOOK_URL });
const cfTypes = {

View file

@ -9,7 +9,7 @@
"keywords": [],
"author": "",
"license": "ISC",
"type": "commonjs",
"type": "module",
"dependencies": {
"ami": "^1.0.0",
"discord.js": "^14.24.0",