From f47028b5f5f0841afdf3ab2a78356396d800288d Mon Sep 17 00:00:00 2001 From: Kira Date: Wed, 1 Apr 2026 22:30:42 -0400 Subject: [PATCH] command to say --- .gitea/workflows/docker.yml | 6 +++--- commands/say.js | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 commands/say.js diff --git a/.gitea/workflows/docker.yml b/.gitea/workflows/docker.yml index fe24bdd..2cdf721 100644 --- a/.gitea/workflows/docker.yml +++ b/.gitea/workflows/docker.yml @@ -2,7 +2,7 @@ name: Build and Push Docker Image on: push: - branches: [ main ] + branches: [ main, cmdsay ] jobs: build: @@ -21,14 +21,14 @@ jobs: - name: Build Docker Image run: | # Build the image with the commit hash tag - docker build -t git.cesium.one/kira/cockinator . + docker build -t git.cesium.one/kira/cockinator:cmdsay . - name: Push Docker Images env: BRANCH_NAME: ${{ github.ref_name }} SHORT_HASH: ${{ github.sha }} run: | - docker push git.cesium.one/kira/cockinator + docker push git.cesium.one/kira/cockinator:cmdsay - name: Log out from registry if: always() diff --git a/commands/say.js b/commands/say.js new file mode 100644 index 0000000..1875314 --- /dev/null +++ b/commands/say.js @@ -0,0 +1,19 @@ +const { SlashCommandBuilder } = require('discord.js'); + +module.exports = { + data: new SlashCommandBuilder() + .setName('say') + .setDescription('speak on behalf of cockinator') + .addStringOption(option => + option.setName('message') + .setDescription('The message to say') + .setRequired(true) + ), + async execute(interaction) { + if (!config.parentsAndOrGuardians.includes(interaction.member.id)) { + return interaction.reply({ content: 'noe :(', ephemeral: true }); + } + const message = interaction.options.getString('message'); + await interaction.reply({ content: message }); + }, +}; \ No newline at end of file