aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/friendInvites.ts
diff options
context:
space:
mode:
authorafn <hey@afn.lol>2023-03-20 22:13:11 -0400
committerGitHub <noreply@github.com>2023-03-21 03:13:11 +0100
commit87e46f5a5a2349efd123333c3b70bdfa3db77ef4 (patch)
tree587f4e1ca2e0330a166646db2aa548e6febe11a6 /src/plugins/friendInvites.ts
parente36f4e5b0aed93f6b24a42eb738fc5f38579bf3c (diff)
downloadVencord-87e46f5a5a2349efd123333c3b70bdfa3db77ef4.tar.gz
Vencord-87e46f5a5a2349efd123333c3b70bdfa3db77ef4.tar.bz2
Vencord-87e46f5a5a2349efd123333c3b70bdfa3db77ef4.zip
chore(friendInvites): improve descriptions formatting (#628)
Diffstat (limited to 'src/plugins/friendInvites.ts')
-rw-r--r--src/plugins/friendInvites.ts16
1 files 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: <t:${new Date(createInvite.expires_at).getTime() / 1000}:R>
+ discord.gg/${createInvite.code} ·
+ Expires: <t:${new Date(createInvite.expires_at).getTime() / 1000}:R> ·
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: <t:${new Date(i.expires_at).getTime() / 1000}:R>
+ `_discord.gg/${i.code}_ ·
+ Expires: <t:${new Date(i.expires_at).getTime() / 1000}:R> ·
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."
});
},
},