From 64baed9d8f3e7195b068a64966747567b5f3fb36 Mon Sep 17 00:00:00 2001 From: Pranshu Patel <70943732+pranshu05@users.noreply.github.com> Date: Sat, 4 Dec 2021 20:45:55 +0530 Subject: [PATCH] Add files via upload --- commands/echo.js | 19 +++++++++++++++++++ commands/ping.js | 12 +++++++++++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 commands/echo.js diff --git a/commands/echo.js b/commands/echo.js new file mode 100644 index 0000000..ccb90cf --- /dev/null +++ b/commands/echo.js @@ -0,0 +1,19 @@ +const { SlashCommandBuilder } = require("@discordjs/builders"); +const { Interaction } = require("discord.js"); + +module.exports = { + data: new SlashCommandBuilder() + .setName("echo") + .setDescription("Echoes your inputs!") + .addStringOption(option => + option + .setName("message") + .setDescription("The message to Echo") + .setRequired(true) + ), + async execute(interaction){ + interaction.reply({ + content: interaction.options.getString("message"), + }) + } +} \ No newline at end of file diff --git a/commands/ping.js b/commands/ping.js index 8b13789..477f704 100644 --- a/commands/ping.js +++ b/commands/ping.js @@ -1 +1,11 @@ - +const { SlashCommandBuilder } = require("@discordjs/builders"); +const { Interaction } = require("discord.js"); + +module.exports = { + data: new SlashCommandBuilder() + .setName("ping") + .setDescription("Pong!"), + async execute(interaction){ + interaction.reply("Pong!") + } +} \ No newline at end of file