From 98d44f78a3f2048c737812e3cccdeee857110266 Mon Sep 17 00:00:00 2001 From: ChrisChrome Date: Thu, 27 Apr 2023 11:39:33 -0600 Subject: [PATCH] Hmm --- .gitignore | 3 ++- embeds.json | 14 -------------- index.js | 7 ++----- 3 files changed, 4 insertions(+), 20 deletions(-) delete mode 100644 embeds.json diff --git a/.gitignore b/.gitignore index cfa7893..6214b18 100644 --- a/.gitignore +++ b/.gitignore @@ -133,4 +133,5 @@ config.json config.json.old config.json.disabled -test.js \ No newline at end of file +test.js +embeds.json \ No newline at end of file diff --git a/embeds.json b/embeds.json deleted file mode 100644 index f2c8660..0000000 --- a/embeds.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "_comment": "This file is a work in progress, and is currently unused. To be used later :)", - "extInfo": { - "title": "LiteNet Phone Systems", - "description": "This is the full extension list for our community phone system!", - "color": 65535, - "fields": [ - { - "name": "Extensions", - "value": "this gets replaced in code" - } - ] - } -} \ No newline at end of file diff --git a/index.js b/index.js index 45e4708..7f5f74f 100644 --- a/index.js +++ b/index.js @@ -2,6 +2,7 @@ const config = require("./config.json"); const funcs = require("./funcs.js"); const colors = require("colors"); +const embeds = require("./embeds.json") // FreePBX GraphQL Client const { FreepbxGqlClient, @@ -582,11 +583,7 @@ dcClient.on('interactionCreate', async interaction => { break; case "button": interaction.channel.send({ - embeds: [{ - "title": "Community Phone System Controls", - "description": "Use the buttons below to manage your extension.", - "color": null - }], + embeds: embeds.controls, components: [{ type: 1, components: [{