From 3d3b91a4cd20e0bfc6d1ba30bb94f115297737cf Mon Sep 17 00:00:00 2001 From: bignutty <3515180-bignutty@users.noreply.gitlab.com> Date: Sun, 26 Jan 2025 14:21:47 +0100 Subject: [PATCH] limit maps select length (fixes https://discord.com/channels/949405492491452496/1128701363484905573/1331399827321393423) --- commands/interaction/slash/search/maps.js | 4 ++-- commands/message/search/maps.js | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/commands/interaction/slash/search/maps.js b/commands/interaction/slash/search/maps.js index b597999..d76dd87 100644 --- a/commands/interaction/slash/search/maps.js +++ b/commands/interaction/slash/search/maps.js @@ -213,10 +213,10 @@ module.exports = { placeholder: "Select a place", defaultValues: [], options: search.places.map((p, i) => ({ - label: p.place.name, + label: stringwrap(p.place.name, 100), value: `${i}`, emoji: icon(`maps_${p.place.icon}_pin`), - description: p.place.address + description: stringwrap(p.place.address, 100) })) }) } diff --git a/commands/message/search/maps.js b/commands/message/search/maps.js index abfe797..fff926e 100644 --- a/commands/message/search/maps.js +++ b/commands/message/search/maps.js @@ -3,7 +3,7 @@ const { PERMISSION_GROUPS } = require('#constants'); const { createEmbed, hexToEmbedColor } = require('#utils/embed'); const { acknowledge } = require('#utils/interactions'); -const { link, icon, iconAsEmojiObject, citation } = require('#utils/markdown'); +const { link, icon, iconAsEmojiObject, citation, stringwrap } = require('#utils/markdown'); const { editOrReply } = require('#utils/message') const { STATICS, STATIC_ASSETS } = require('#utils/statics') @@ -202,10 +202,10 @@ module.exports = { placeholder: "Select a place", defaultValues: [], options: search.places.map((p, i) => ({ - label: p.place.name, + label: stringwrap(p.place.name, 100), value: `${i}`, emoji: icon(`maps_${p.place.icon}_pin`), - description: p.place.address + description: stringwrap(p.place.address, 100) })) }) }