aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-06-19 16:57:35 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-06-19 16:57:35 -0400
commit76702f62bc0f0e91ad64eec677ce56813601c906 (patch)
tree776219582cf80e135ddd0d47ac7e59057696371e
parent7dd24cbd5456891da58054bf343aa7f513f51205 (diff)
downloadtanzanite-76702f62bc0f0e91ad64eec677ce56813601c906.tar.gz
tanzanite-76702f62bc0f0e91ad64eec677ce56813601c906.tar.bz2
tanzanite-76702f62bc0f0e91ad64eec677ce56813601c906.zip
some documentation
-rw-r--r--src/lib/common/typings/BushInspectOptions.ts2
-rw-r--r--src/lib/extensions/discord.js/ExtendedMessage.ts6
-rw-r--r--src/lib/utils/AllowedMentions.ts33
-rw-r--r--src/lib/utils/BushLogger.ts10
-rw-r--r--src/lib/utils/CanvasProgressBar.ts5
5 files changed, 16 insertions, 40 deletions
diff --git a/src/lib/common/typings/BushInspectOptions.ts b/src/lib/common/typings/BushInspectOptions.ts
index 9b91c0e..608000c 100644
--- a/src/lib/common/typings/BushInspectOptions.ts
+++ b/src/lib/common/typings/BushInspectOptions.ts
@@ -1,7 +1,7 @@
import { type InspectOptions } from 'util';
/**
- * {@link https://nodejs.org/api/util.html#util_util_inspect_object_options}
+ * {@link https://nodejs.org/api/util.html#utilinspectobject-showhidden-depth-colors util.inspect Options Documentation}
*/
export interface BushInspectOptions extends InspectOptions {
/**
diff --git a/src/lib/extensions/discord.js/ExtendedMessage.ts b/src/lib/extensions/discord.js/ExtendedMessage.ts
index 0d8ce37..4748803 100644
--- a/src/lib/extensions/discord.js/ExtendedMessage.ts
+++ b/src/lib/extensions/discord.js/ExtendedMessage.ts
@@ -5,8 +5,8 @@ import { type RawMessageData } from 'discord.js/typings/rawDataTypes.js';
export class ExtendedMessage<Cached extends boolean = boolean> extends Message<Cached> {
public declare util: CommandUtil<Message>;
- public constructor(client_: Client, data: RawMessageData) {
- super(client_, data);
- this.util = new CommandUtil(this.client.commandHandler, this);
+ public constructor(client: Client, data: RawMessageData) {
+ super(client, data);
+ this.util = new CommandUtil(client.commandHandler, this);
}
}
diff --git a/src/lib/utils/AllowedMentions.ts b/src/lib/utils/AllowedMentions.ts
index 400da76..d2eb030 100644
--- a/src/lib/utils/AllowedMentions.ts
+++ b/src/lib/utils/AllowedMentions.ts
@@ -5,37 +5,12 @@ import { type MessageMentionOptions, type MessageMentionTypes } from 'discord.js
*/
export class AllowedMentions {
/**
- * Whether @everyone and @here should be mentioned.
- */
- public everyone: boolean;
-
- /**
- * Whether users should be mentioned.
- */
- public users: boolean;
-
- /**
- * Whether roles should be mentioned.
- */
- public roles: boolean;
-
- /**
- * Whether the author of the Message being replied to should be mentioned.
- */
- public repliedUser: boolean;
-
- /**
- * @param users Whether users should be mentioned.
+ * @param everyone Whether everyone and here should be mentioned.
* @param roles Whether roles should be mentioned.
- * @param everyone Whether @everyone and @here should be mentioned.
+ * @param users Whether users should be mentioned.
* @param repliedUser Whether the author of the Message being replied to should be mentioned.
*/
- public constructor(users = true, roles = false, everyone = false, repliedUser = true) {
- this.everyone = everyone;
- this.roles = roles;
- this.users = users;
- this.repliedUser = repliedUser;
- }
+ public constructor(public everyone = false, public roles = false, public users = true, public repliedUser = true) {}
/**
* Don't mention anyone.
@@ -62,7 +37,7 @@ export class AllowedMentions {
}
/**
- * Mention @everyone and @here.
+ * Mention everyone and here.
* @param repliedUser Whether the author of the Message being replied to should be mentioned.
*/
public static everyone(repliedUser = true): MessageMentionOptions {
diff --git a/src/lib/utils/BushLogger.ts b/src/lib/utils/BushLogger.ts
index 1be58a4..3cfd860 100644
--- a/src/lib/utils/BushLogger.ts
+++ b/src/lib/utils/BushLogger.ts
@@ -132,12 +132,10 @@ function getTimeStamp(): string {
* Custom logging utility for the bot.
*/
export class BushLogger {
- public constructor(
- /**
- * The client.
- */
- public client: Client
- ) {}
+ /**
+ * @param client The client.
+ */
+ public constructor(public client: Client) {}
/**
* Logs information. Highlight information by surrounding it in `<<>>`.
diff --git a/src/lib/utils/CanvasProgressBar.ts b/src/lib/utils/CanvasProgressBar.ts
index 21c4e22..fb4f778 100644
--- a/src/lib/utils/CanvasProgressBar.ts
+++ b/src/lib/utils/CanvasProgressBar.ts
@@ -1,6 +1,9 @@
import { CanvasRenderingContext2D } from 'canvas';
-// I just copy pasted this code from stackoverflow don't yell at me if there is issues for it
+/**
+ * I just copy pasted this code from stackoverflow don't yell at me if there is issues for it
+ * @author @TymanWasTaken
+ */
export class CanvasProgressBar {
private readonly x: number;
private readonly y: number;