From dc6d3a0f192893c2fa0c5bb92652cfa6454d3845 Mon Sep 17 00:00:00 2001 From: derpystuff <3515180-derpystuff@users.noreply.gitlab.com> Date: Sat, 4 Nov 2023 18:22:25 +0100 Subject: [PATCH] design changes --- commands/message/core/privacy.js | 4 ++-- commands/message/info/invite.js | 6 +++--- labscore/constants.js | 11 +++++++++-- labscore/utils/embed.js | 4 ++-- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/commands/message/core/privacy.js b/commands/message/core/privacy.js index 9bab9ba..359f15a 100644 --- a/commands/message/core/privacy.js +++ b/commands/message/core/privacy.js @@ -1,4 +1,4 @@ -const { icon, timestamp, link } = require('../../../labscore/utils/markdown') +const { icon, timestamp, link, iconLinkPill } = require('../../../labscore/utils/markdown') const { createEmbed } = require('../../../labscore/utils/embed') const { editOrReply } = require('../../../labscore/utils/message'); const { PRIVACY_POLICY_LAST_UPDATE, PRIVACY_POLICY_SECTIONS, DISCORD_INVITES, COLORS } = require('../../../labscore/constants'); @@ -17,7 +17,7 @@ module.exports = { run: async (context) => { return await editOrReply(context, createEmbed("default", context, { - description: `${icon("agreements")} **labsCore Privacy Policy**\n*Last Updated: ${timestamp(PRIVACY_POLICY_LAST_UPDATE, "f")}*\n\n${PRIVACY_POLICY_SECTIONS.join('\n\n')}\n\nIf you have any further questions, please contact us via our ${link(DISCORD_INVITES.privacy, "Support Server")}`, + description: `${icon("brand")} **${context.client.user.username} Privacy Policy**\n*Last Updated: ${timestamp(PRIVACY_POLICY_LAST_UPDATE, "f")}*\n\n${PRIVACY_POLICY_SECTIONS.join('\n\n')}\n\nIf you have any further questions, please contact us via our ${iconLinkPill("discord", DISCORD_INVITES.privacy, "Support Server", "Click to join")}`, color: COLORS.brand }) ) diff --git a/commands/message/info/invite.js b/commands/message/info/invite.js index c261bba..e98541a 100644 --- a/commands/message/info/invite.js +++ b/commands/message/info/invite.js @@ -23,12 +23,12 @@ module.exports = { permissionsClient: [Permissions.EMBED_LINKS, Permissions.SEND_MESSAGES, Permissions.USE_EXTERNAL_EMOJIS, Permissions.READ_MESSAGE_HISTORY], run: async (context, args) => { context.triggerTyping(); - if(!args.invite) return editOrReply(context, { content: `https://canary.discord.com/application-directory/${context.client.user.id}`, embed:createEmbed("default", context, { + if(!args.invite) return editOrReply(context, { content: link(`https://canary.discord.com/application-directory/${context.client.user.id} `, "⠀", 'App Directory URL'), embed:createEmbed("default", context, { description: [ '​', - icon('link') + ` You can invite ${context.client.user.username} with ${link(context.application.oauth2UrlFormat({ scope: 'bot applications.commands', permissions: 412317248576 }), 'this link')}.`, + icon('brand') + ` You can invite ${context.client.user.username} with this ${iconLinkPill("link", context.application.oauth2UrlFormat({ scope: 'bot applications.commands', permissions: 412317248576 }), 'Invite Link', 'Discord Application Invite URL')}.`, '', - icon('robot') + ` Need help? Join our ${link(DISCORD_INVITES.support, 'Support Server')}.`, + icon('robot') + ` Need help? Join our ${iconLinkPill("discord", DISCORD_INVITES.support, 'Support Server', "Click to join")}.`, '', iconLinkPill('gitlab', OPEN_SOURCE_REPOSITORY_URL, 'Source Code'), ].join('\n'), diff --git a/labscore/constants.js b/labscore/constants.js index 2644ade..72b1cde 100644 --- a/labscore/constants.js +++ b/labscore/constants.js @@ -14,14 +14,18 @@ module.exports.PRIVACY_POLICY_SECTIONS = [ module.exports.PRIVACY_POLICY_LAST_UPDATE = 1655325547140 +module.exports.SUPPORT_ARTICLES = { + AGE_RESTRICTED_CHANNELS: 115000084051 +} + module.exports.OPEN_SOURCE_REPOSITORY_URL = "https://gitlab.com/bignutty/labscore" module.exports.COLORS = Object.freeze({ error: 15548997, - success: 6411359, + success: 8191849, warning: 16426522, embed: 2829617, - brand: 6085465, + brand: 6809687, nsfw: 15549056 }) @@ -120,6 +124,8 @@ module.exports.BADGE_ICONS = Object.freeze({ }) module.exports.REDESIGN_ICONS = Object.freeze({ + "brand": "<:ico_brand:1170410186062712872>", + "home": "<:ico_home:1165257185488551976>", "image": "<:ico_image:1165257188235825274>", "search": "<:ico_search:1165257190047748176>", @@ -149,6 +155,7 @@ module.exports.REDESIGN_ICONS = Object.freeze({ "activity": "<:ico_activity:1165257605858476073>", "attachment": "<:ico_attachment:1165257607309688945>", "boost": "<:ico_boost:1165257610983907398>", + "discord": "<:ico_discord:1170410879129485464>", "emoji": "<:ico_emoji:1165257613320130651>", "link": "<:ico_link:1165257615178207302>", "locale": "<:ico_locale:1165257616600092712>", diff --git a/labscore/utils/embed.js b/labscore/utils/embed.js index 4a0b5a1..9ba7f6b 100644 --- a/labscore/utils/embed.js +++ b/labscore/utils/embed.js @@ -1,4 +1,4 @@ -const { COLORS } = require('../constants') +const { COLORS, SUPPORT_ARTICLES } = require('../constants') const { STATIC_ICONS, STATICS, STATIC_ASSETS } = require('./statics') const embedTypes = Object.freeze({ @@ -65,7 +65,7 @@ const embedTypes = Object.freeze({ author: { iconUrl: STATIC_ICONS.adult, name: `This command is only available in Age Restricted channels.`, - url: `https://support.discord.com/hc/en-us/articles/115000084051-Age-Restricted-Channels-and-Content` + url: `https://support.discord.com/hc/en-us/articles/${SUPPORT_ARTICLES.AGE_RESTRICTED_CHANNELS}` }, color: COLORS.nsfw }