From 87e46f5a5a2349efd123333c3b70bdfa3db77ef4 Mon Sep 17 00:00:00 2001 From: afn Date: Mon, 20 Mar 2023 22:13:11 -0400 Subject: chore(friendInvites): improve descriptions formatting (#628) --- src/plugins/friendInvites.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/plugins/friendInvites.ts b/src/plugins/friendInvites.ts index 73dffd1..2ad47d9 100644 --- a/src/plugins/friendInvites.ts +++ b/src/plugins/friendInvites.ts @@ -23,7 +23,7 @@ import { findByProps } from "@webpack"; export default definePlugin({ name: "FriendInvites", - description: "Generate and manage friend invite links.", + description: "Create and manage friend invite links via slash commands (/create friend invite, /view friend invites, /revoke friend invites).", authors: [Devs.afn], dependencies: ["CommandsAPI"], commands: [ @@ -37,8 +37,8 @@ export default definePlugin({ return void sendBotMessage(ctx.channel.id, { content: ` - discord.gg/${createInvite.code} - Expires: + discord.gg/${createInvite.code} · + Expires: · Max uses: \`${createInvite.max_uses}\` `.trim().replace(/\s+/g, " ") }); @@ -52,25 +52,25 @@ export default definePlugin({ const friendInvites = findByProps("createFriendInvite"); const invites = await friendInvites.getAllFriendInvites(); const friendInviteList = invites.map(i => - `_discord.gg/${i.code}_ - Expires: + `_discord.gg/${i.code}_ · + Expires: · Times used: \`${i.uses}/${i.max_uses}\``.trim().replace(/\s+/g, " ") ); return void sendBotMessage(ctx.channel.id, { - content: friendInviteList.join("\n\n") || "You have no active friend invites!" + content: friendInviteList.join("\n") || "You have no active friend invites!" }); }, }, { name: "revoke friend invites", - description: "Revokes ALL generated friend invite links.", + description: "Revokes all generated friend invites.", inputType: ApplicationCommandInputType.BOT, execute: async (_, ctx) => { await findByProps("createFriendInvite").revokeFriendInvites(); return void sendBotMessage(ctx.channel.id, { - content: "All friend links have been revoked." + content: "All friend invites have been revoked." }); }, }, -- cgit