aboutsummaryrefslogtreecommitdiff
path: root/src/lib/extensions
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/extensions')
-rw-r--r--src/lib/extensions/discord-akairo/BushClientUtil.ts6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/lib/extensions/discord-akairo/BushClientUtil.ts b/src/lib/extensions/discord-akairo/BushClientUtil.ts
index da98dac..ef51b63 100644
--- a/src/lib/extensions/discord-akairo/BushClientUtil.ts
+++ b/src/lib/extensions/discord-akairo/BushClientUtil.ts
@@ -1012,11 +1012,7 @@ export class BushClientUtil extends ClientUtil {
* @param surroundChar2 - The character placed in the end of the element. Defaults to `surroundChar1`.
*/
public surroundArray(array: string[], surroundChar1: string, surroundChar2?: string): string[] {
- const newArray: string[] = [];
- array.forEach((a) => {
- newArray.push(`${surroundChar1}${a}${surroundChar2 ?? surroundChar1}`);
- });
- return newArray;
+ return array.map((a) => `${surroundChar1}${a}${surroundChar2 ?? surroundChar1}`);
}
public parseDuration(content: string, remove = true): { duration: number; contentWithoutTime: string | null } {