From d20e442ef3fa4bb7da644f003cb95f33664aa761 Mon Sep 17 00:00:00 2001 From: Nicky <111157596+xNickyDev@users.noreply.github.com> Date: Mon, 3 Jul 2023 12:48:26 +0200 Subject: [PATCH] Added $displayName (#327) * Create displayName.md * Create displayNameComplex.md * Update displayName.md * Update SUMMARY.md --- src/SUMMARY.md | 2 ++ src/bdscript/displayName.md | 14 ++++++++++++++ src/bdscript/displayNameComplex.md | 17 +++++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 src/bdscript/displayName.md create mode 100644 src/bdscript/displayNameComplex.md diff --git a/src/SUMMARY.md b/src/SUMMARY.md index 826c555000..6ca641fa17 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -154,6 +154,8 @@ - [$disableInnerSpaceRemoval](./bdscript/disableInnerSpaceRemoval.md) - [$disableSpecialEscaping](./bdscript/disableSpecialEscaping.md) - [$discriminator](./bdscript/discriminator.md) + - [$displayName](./bdscript/displayName.md) + - [$displayName[]](./bdscript/displayNameComplex.md) - [$divide](./bdscript/divide.md) - [$dm](./bdscript/dm.md) - [$dmChannelID](./bdscript/dmChannelID.md) diff --git a/src/bdscript/displayName.md b/src/bdscript/displayName.md new file mode 100644 index 0000000000..d2991b4c7d --- /dev/null +++ b/src/bdscript/displayName.md @@ -0,0 +1,14 @@ +# $displayName +Returns the author's display name. + +## Syntax +``` +$displayName +``` + +## Example +``` +$nomention +Your display name is `$displayName` +``` +![example](https://user-images.githubusercontent.com/111157596/249784142-f89e590e-cdf2-4226-bdf5-082b52533329.png) diff --git a/src/bdscript/displayNameComplex.md b/src/bdscript/displayNameComplex.md new file mode 100644 index 0000000000..cff49e7fd3 --- /dev/null +++ b/src/bdscript/displayNameComplex.md @@ -0,0 +1,17 @@ +# $displayName[] +Returns the display name of the given user. + +## Syntax +``` +$displayName[User ID] +``` + +### Parameters +- `User ID` `(Type: Snowflake || Flag: Required)`: The user to get the display name for. + +## Example +``` +$nomention +**$username[$message[1]]**'s display name is `$displayName[$message[1]]` +``` +![example](https://user-images.githubusercontent.com/111157596/249786688-61ed7be7-2c9d-48f0-8a7a-280e498a09e7.png)