diff --git a/commands.json b/commands.json index 0efb96a..b048284 100644 --- a/commands.json +++ b/commands.json @@ -25,6 +25,11 @@ { "name": "thisu", "description": "Have Ben tell people how he truly feels.", - "type": 4 + "type": 3 + }, + { + "name": "iconic", + "description": "Have Ben post the iconic Supply-Demand curve.", + "type": 3 } ] diff --git a/index.js b/index.js index bb7e44b..64622cd 100644 --- a/index.js +++ b/index.js @@ -12,7 +12,7 @@ client.once("ready", () => { commands.forEach((element) => { client.api - .applications(config.botId) //.guilds("249809874853036033") + .applications(config.botId).guilds("249809874853036033") .commands.post({ data: element }) .then((response) => console.log(response)) .catch((error) => console.log(error)); @@ -79,6 +79,20 @@ client.ws.on("INTERACTION_CREATE", async (interaction) => { }) .catch((error) => console.log(error)) } + else if (command === "iconic") { + client.api + .interactions(interaction.id, interaction.token) + .callback.post({ + data: { + type: 3, + data: { + content: + "https://i.imgur.com/k7FjY1m.jpg", + }, + }, + }) + .catch((error) => console.log(error)) + } } else { console.log("Unknown command."); }