From 2a101de2fc4b454e7320a8e9ee1e0ba5ba07cea0 Mon Sep 17 00:00:00 2001 From: ChrisChrome Date: Wed, 8 May 2024 10:41:41 -0600 Subject: [PATCH] Funny --- debug.js | 17 +++++++++++++++++ index.js | 6 +++++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 debug.js diff --git a/debug.js b/debug.js new file mode 100644 index 0000000..a79d496 --- /dev/null +++ b/debug.js @@ -0,0 +1,17 @@ +const Discord = require('discord.js'); +const client = new Discord.Client({intents: ["Guilds"]}) +const config = require('./config.json'); + +categories = ["1237805446019154003", "1237805447004553266", "1237805448128630795", "1237805449089384508"] + +client.once('ready', () => { + console.log('Ready!'); + client.guilds.cache.get("1237792259248750673").channels.cache.forEach(channel => { + if (!channel.parent) return; + if (categories.includes(channel.parent.id)) { + channel.delete(); + } + }) +}) + +client.login(config.discord.token); \ No newline at end of file diff --git a/index.js b/index.js index f25f169..f94514c 100644 --- a/index.js +++ b/index.js @@ -107,9 +107,13 @@ function getWFOByRoom(room) { return wfos[key]; } } - return "Unknown"; + return { + location: room, + room: room + }; } + const xmpp = client({ service: "xmpp://conference.weather.im", domain: "weather.im"