Remove discord.js dependency.

This commit is contained in:
Kurt Hutten
2022-01-23 12:55:57 +11:00
parent c9b12fc938
commit 32ca0eda34
4 changed files with 8 additions and 78 deletions

View File

@@ -9,7 +9,6 @@
"axios": "^0.25.0",
"cloudinary": "^1.23.0",
"cors": "^2.8.5",
"discord.js": "^13.5.1",
"express": "^4.17.1",
"human-id": "^2.0.1",
"middy": "^0.36.0",

View File

@@ -1,5 +1,4 @@
import axios from 'axios'
import {Client, Intents, MessageAttachment} from "discord.js"
let inst = null;
if (!process.env.DISCORD_TOKEN || !process.env.DISCORD_CHANNEL_ID) {
@@ -21,7 +20,7 @@ export async function sendDiscordMessage(text: string, url?: string) {
return inst.post(API_URL, { embeds: [{
title: text,
image: {
url: url,
url,
},
}] });
} else {