mirror of
https://github.com/RGBCube/TwitterDiscordWebhook
synced 2025-07-27 04:57:44 +00:00
Fix: add type: module to package.json
This commit is contained in:
parent
e16ce3aac0
commit
1b61f17f61
2 changed files with 3 additions and 1 deletions
3
main.js
3
main.js
|
@ -1,7 +1,8 @@
|
||||||
|
import fs from "fs";
|
||||||
import Twitter from "twit";
|
import Twitter from "twit";
|
||||||
import { Webhook } from "discord-webhook-node";
|
import { Webhook } from "discord-webhook-node";
|
||||||
|
|
||||||
const config = require("config.json");
|
const config = JSON.parse(fs.readFileSync("./config.json"));
|
||||||
|
|
||||||
const dClient = new Webhook(config.discord.webhookUrl);
|
const dClient = new Webhook(config.discord.webhookUrl);
|
||||||
dClient.setUsername(config.discord.webhookName);
|
dClient.setUsername(config.discord.webhookName);
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"author": "Stovven & RGBCube",
|
"author": "Stovven & RGBCube",
|
||||||
"license": "AGPL",
|
"license": "AGPL",
|
||||||
|
"type": "module",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"discord-webhook-node": "^1.1.8",
|
"discord-webhook-node": "^1.1.8",
|
||||||
"twit": "^2.2.11"
|
"twit": "^2.2.11"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue