From 055be119cc18030a114e33cfd5eed9487dc1ac08 Mon Sep 17 00:00:00 2001 From: Minzkraut Date: Tue, 13 Sep 2022 00:28:14 +0200 Subject: [PATCH] Profile: Show rendering gif placeholder instead of thinking text while the profile is being rendered in the background. --- commands/profile.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/commands/profile.js b/commands/profile.js index 4f47bce..12e09e4 100644 --- a/commands/profile.js +++ b/commands/profile.js @@ -1,4 +1,4 @@ -const { SlashCommandBuilder, EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle } = require("discord.js"); +const { SlashCommandBuilder, MessageAttachment, ActionRowBuilder, ButtonBuilder, ButtonStyle } = require("discord.js"); const { Card, User, Character } = require("../models"); const { UserUtils, Compositing, Rendering } = require("../util"); const axios = require("axios"); @@ -19,7 +19,8 @@ module.exports = { .setRequired(false) ), async execute(interaction) { - await interaction.deferReply(); + await interaction.reply({ files:[ 'https://cdn.discordapp.com/attachments/856904078754971658/1019009533470842930/rendering-placeholder.gif']}); + let discordUser = interaction.options.getUser("user") ? interaction.options.getUser("user") : interaction.member.user; let user = await UserUtils.getUserByDiscordId(discordUser.id);