From acb44c202ffa8f65f9e84d2df377f36befbffdaf Mon Sep 17 00:00:00 2001 From: Sebastian Danielzik Date: Sun, 11 Aug 2024 20:02:15 +0200 Subject: [PATCH] response command update --- src/commands/funny/respond.ts | 12 ++---------- src/resources/respond.json | 15 +++++++++++++-- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/commands/funny/respond.ts b/src/commands/funny/respond.ts index d2ef0c8..43b1155 100644 --- a/src/commands/funny/respond.ts +++ b/src/commands/funny/respond.ts @@ -12,15 +12,7 @@ export default command(meta, async ({ interaction, client }) => { const user = interaction.member?.user.username; async function randomResponse() { - const data = await fetch( - "https://raw.githubusercontent.com/Moonded/responses/main/responses.json" - ); - - let responses = await data.json(); - - if (!Array.isArray(responses)) { - responses = localResponses; - } + let responses = localResponses; return responses[Math.floor(Math.random() * responses.length)]; } @@ -28,7 +20,7 @@ export default command(meta, async ({ interaction, client }) => { let response = await randomResponse(); while (response.User !== "everyone" && response.User !== user) { - response = randomResponse(); + response = await randomResponse(); } const channel = client.channels.cache.get( diff --git a/src/resources/respond.json b/src/resources/respond.json index e32632c..a874ef7 100644 --- a/src/resources/respond.json +++ b/src/resources/respond.json @@ -1,6 +1,9 @@ [ { "Message": "The fuck you want?", "User": "everyone" }, - { "Message": "I am here to serve you, creator", "User": "moonded" }, + { + "Message": "I am here to serve you, my creator Moonded.", + "User": "moonded" + }, { "Message": "I am V", "User": "projectv" }, { "Message": "the bin in the bin", "User": "everyone" }, { @@ -40,5 +43,13 @@ { "Message": "hello im new here how fix unresolved hash error? useless modders always updating shit without my consent I HAD A REASON TO PIRATE I ALREADY BOUGHT THE GAME this is why the game is DEAD, mod abooz pls demot", "User": "everyone" - } + }, + { + "Message": "In terms of getting people to mod, I'm the world's worst slut", + "User": "everyone" + }, + { "Message": "## LINK HARDER", "User": "everyone" }, + { "Message": "## INTERLINK EVERYTHING", "User": "everyone" }, + { "Message": "_Psst,_ wanna buy some oranges?", "User": "fronkenzeepa" }, + { "Message": "What the dog doing?", "User": "moonded" } ]