[cardstack] add feedback notice

This commit is contained in:
bignutty 2025-02-13 02:36:56 +01:00
parent 510cbbe60d
commit 3e0078979c
2 changed files with 10 additions and 4 deletions

View file

@ -1,5 +1,5 @@
const { createEmbed, page } = require("#utils/embed");
const { iconAsEmojiObject } = require("#utils/markdown");
const { iconAsEmojiObject, icon, link} = require("#utils/markdown");
const { editOrReply } = require("#utils/message");
const { STATIC_ASSETS } = require("#utils/statics");
@ -7,6 +7,7 @@ const { Context } = require("detritus-client/lib/command");
const { MessageComponentTypes, InteractionCallbackTypes } = require("detritus-client/lib/constants");
const { Message } = require("detritus-client/lib/structures");
const { ComponentContext, Components, ComponentActionRow} = require("detritus-client/lib/utils");
const {DISCORD_INVITES} = require("#constants");
/**
* Stores all active card stacks
@ -174,7 +175,11 @@ class DynamicCardStack {
* @returns {*}
*/
getCardByIndex(index){
return this.activeCardStack[index];
// TODO: remove this some time after launch
let card = Object.assign({}, this.activeCardStack[index])
if(!card.content) card.content = "";
card.content += `\n-# ${icon("flask_mini")} You are using the new page system • Leave feedback or report bugs in our ${link(DISCORD_INVITES.feedback_cardstack, "Discord Server", "labsCore Support", false)}!`
return card;
}
/**
@ -241,7 +246,7 @@ class DynamicCardStack {
* @returns {Message} Card
*/
getCurrentCard(){
return this.getCardByIndex(this.index);
return this.getCardByIndex(this.index)
}
/**

View file

@ -5,7 +5,8 @@ module.exports.DISCORD_INVITES = Object.freeze({
support: "https://discord.gg/8c4p6xcjru",
privacy: "https://discord.gg/sQs8FhcTGh",
invite: "https://discord.gg/cHd28DrM7f",
help: "https://discord.gg/xQNBB3WFne"
help: "https://discord.gg/xQNBB3WFne",
feedback_cardstack: "https://discord.gg/mEWZqhHV3S",
})
module.exports.DEFAULT_BOT_NAME = 'labsCore'