From 9b2120f0a31103528a33276fd0e79c02d8e7eef9 Mon Sep 17 00:00:00 2001 From: Madjosz <28844868+Madjosz@users.noreply.github.com> Date: Thu, 12 Oct 2023 03:13:22 +0300 Subject: [PATCH] restrict /echo to #bot-playground (#89) --- src/commands/echo.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/commands/echo.ts b/src/commands/echo.ts index ff9f49c..e3c10ba 100644 --- a/src/commands/echo.ts +++ b/src/commands/echo.ts @@ -11,6 +11,7 @@ import { strikethrough, underscore, } from "discord.js"; +import { checkBotPlayground } from "../common"; const formats: { [k: string]: (s: string) => string } = { blockQuote, @@ -40,6 +41,7 @@ export const data = async () => .toJSON(); export const call = async (interaction: ChatInputCommandInteraction) => { + checkBotPlayground(false, interaction); const input = interaction.options.getString("input", true); const format = interaction.options.getString("format"); const msg = format && formats.hasOwnProperty(format) ? formats[format](input) : input;