design changes

This commit is contained in:
derpystuff 2023-11-04 18:22:25 +01:00
parent 8a973d95a8
commit dc6d3a0f19
4 changed files with 16 additions and 9 deletions

View file

@ -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 { createEmbed } = require('../../../labscore/utils/embed')
const { editOrReply } = require('../../../labscore/utils/message'); const { editOrReply } = require('../../../labscore/utils/message');
const { PRIVACY_POLICY_LAST_UPDATE, PRIVACY_POLICY_SECTIONS, DISCORD_INVITES, COLORS } = require('../../../labscore/constants'); const { PRIVACY_POLICY_LAST_UPDATE, PRIVACY_POLICY_SECTIONS, DISCORD_INVITES, COLORS } = require('../../../labscore/constants');
@ -17,7 +17,7 @@ module.exports = {
run: async (context) => { run: async (context) => {
return await editOrReply(context, return await editOrReply(context,
createEmbed("default", 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 color: COLORS.brand
}) })
) )

View file

@ -23,12 +23,12 @@ module.exports = {
permissionsClient: [Permissions.EMBED_LINKS, Permissions.SEND_MESSAGES, Permissions.USE_EXTERNAL_EMOJIS, Permissions.READ_MESSAGE_HISTORY], permissionsClient: [Permissions.EMBED_LINKS, Permissions.SEND_MESSAGES, Permissions.USE_EXTERNAL_EMOJIS, Permissions.READ_MESSAGE_HISTORY],
run: async (context, args) => { run: async (context, args) => {
context.triggerTyping(); 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: [ 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'), iconLinkPill('gitlab', OPEN_SOURCE_REPOSITORY_URL, 'Source Code'),
].join('\n'), ].join('\n'),

View file

@ -14,14 +14,18 @@ module.exports.PRIVACY_POLICY_SECTIONS = [
module.exports.PRIVACY_POLICY_LAST_UPDATE = 1655325547140 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.OPEN_SOURCE_REPOSITORY_URL = "https://gitlab.com/bignutty/labscore"
module.exports.COLORS = Object.freeze({ module.exports.COLORS = Object.freeze({
error: 15548997, error: 15548997,
success: 6411359, success: 8191849,
warning: 16426522, warning: 16426522,
embed: 2829617, embed: 2829617,
brand: 6085465, brand: 6809687,
nsfw: 15549056 nsfw: 15549056
}) })
@ -120,6 +124,8 @@ module.exports.BADGE_ICONS = Object.freeze({
}) })
module.exports.REDESIGN_ICONS = Object.freeze({ module.exports.REDESIGN_ICONS = Object.freeze({
"brand": "<:ico_brand:1170410186062712872>",
"home": "<:ico_home:1165257185488551976>", "home": "<:ico_home:1165257185488551976>",
"image": "<:ico_image:1165257188235825274>", "image": "<:ico_image:1165257188235825274>",
"search": "<:ico_search:1165257190047748176>", "search": "<:ico_search:1165257190047748176>",
@ -149,6 +155,7 @@ module.exports.REDESIGN_ICONS = Object.freeze({
"activity": "<:ico_activity:1165257605858476073>", "activity": "<:ico_activity:1165257605858476073>",
"attachment": "<:ico_attachment:1165257607309688945>", "attachment": "<:ico_attachment:1165257607309688945>",
"boost": "<:ico_boost:1165257610983907398>", "boost": "<:ico_boost:1165257610983907398>",
"discord": "<:ico_discord:1170410879129485464>",
"emoji": "<:ico_emoji:1165257613320130651>", "emoji": "<:ico_emoji:1165257613320130651>",
"link": "<:ico_link:1165257615178207302>", "link": "<:ico_link:1165257615178207302>",
"locale": "<:ico_locale:1165257616600092712>", "locale": "<:ico_locale:1165257616600092712>",

View file

@ -1,4 +1,4 @@
const { COLORS } = require('../constants') const { COLORS, SUPPORT_ARTICLES } = require('../constants')
const { STATIC_ICONS, STATICS, STATIC_ASSETS } = require('./statics') const { STATIC_ICONS, STATICS, STATIC_ASSETS } = require('./statics')
const embedTypes = Object.freeze({ const embedTypes = Object.freeze({
@ -65,7 +65,7 @@ const embedTypes = Object.freeze({
author: { author: {
iconUrl: STATIC_ICONS.adult, iconUrl: STATIC_ICONS.adult,
name: `This command is only available in Age Restricted channels.`, 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 color: COLORS.nsfw
} }