From 88cab1a0ecffc13fa49ecf1017ef188f5c0291d3 Mon Sep 17 00:00:00 2001 From: Jiralite <33201955+Jiralite@users.noreply.github.com> Date: Thu, 13 Apr 2023 21:55:15 +0100 Subject: [PATCH] fix: Update `DocsLink` usage (#9382) --- .../02-creating-your-bot/02-creating-commands.mdx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/apps/guide/src/content/02-creating-your-bot/02-creating-commands.mdx b/apps/guide/src/content/02-creating-your-bot/02-creating-commands.mdx index a4099ffda..67a3ac70e 100644 --- a/apps/guide/src/content/02-creating-your-bot/02-creating-commands.mdx +++ b/apps/guide/src/content/02-creating-your-bot/02-creating-commands.mdx @@ -97,9 +97,9 @@ Once you fill in these values, run _`node deploy-commands.js`_ in your project d ## Replying to commands -Once you've registered your commands, you can listen for interactions via in your _`index.js`_ file. +Once you've registered your commands, you can listen for interactions via in your _`index.js`_ file. -You should first check if an interaction is a chat input command via _`.isChatInputCommand()`_, and then check the _`.commandName`_ property to know which command it is. You can respond to interactions with _`.reply()`_. +You should first check if an interaction is a chat input command via _`.isChatInputCommand()`_, and then check the _`.commandName`_ property to know which command it is. You can respond to interactions with _`.reply()`_. @@ -126,7 +126,7 @@ client.login(token); ### Server info command -Note that servers are referred to as "guilds" in the Discord API and discord.js library. _`interaction.guild`_ refers to the guild the interaction was sent in (a instance), which exposes properties such as _`.name`_ or _`.memberCount`_. +Note that servers are referred to as "guilds" in the Discord API and discord.js library. _`interaction.guild`_ refers to the guild the interaction was sent in (a instance), which exposes properties such as _`.name`_ or _`.memberCount`_. @@ -171,12 +171,13 @@ client.on('interactionCreate', async (interaction) => { You could also display the date the server was created, or the server's verification level. You would do those in the same manner – use _`interaction.guild.createdAt`_ or _`interaction.guild.verificationLevel`_, respectively. - Refer to the documentation for a list of all the available properties and methods! + Refer to the documentation for a list of all the available properties and + methods! ### User info command -A "user" refers to a Discord user. _`interaction.user`_ refers to the user the interaction was sent by (a instance), which exposes properties such as _`.tag`_ or _`.id`_. +A "user" refers to a Discord user. _`interaction.user`_ refers to the user the interaction was sent by (a instance), which exposes properties such as _`.tag`_ or _`.id`_. @@ -219,7 +220,8 @@ client.on('interactionCreate', async (interaction) => { - Refer to the documentation for a list of all the available properties and methods! + Refer to the documentation for a list of all the available properties and + methods! And there you have it!