aboutsummaryrefslogtreecommitdiff
path: root/lib/extensions/discord.js/ExtendedUser.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-09-07 21:33:37 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-09-07 21:33:37 -0400
commited98ff7e2679f362f2657e77a6cf8dd3ce9b3d43 (patch)
tree75a6ba3cf992c1d563ddb8042d4cd9b4278207b8 /lib/extensions/discord.js/ExtendedUser.ts
parent15b6988ccffc0a21a570bee7fcb8aabe6ffe08c7 (diff)
downloadtanzanite-ed98ff7e2679f362f2657e77a6cf8dd3ce9b3d43.tar.gz
tanzanite-ed98ff7e2679f362f2657e77a6cf8dd3ce9b3d43.tar.bz2
tanzanite-ed98ff7e2679f362f2657e77a6cf8dd3ce9b3d43.zip
clean upHEADmaster
Diffstat (limited to 'lib/extensions/discord.js/ExtendedUser.ts')
-rw-r--r--lib/extensions/discord.js/ExtendedUser.ts34
1 files changed, 15 insertions, 19 deletions
diff --git a/lib/extensions/discord.js/ExtendedUser.ts b/lib/extensions/discord.js/ExtendedUser.ts
index 65b14c7..7846a70 100644
--- a/lib/extensions/discord.js/ExtendedUser.ts
+++ b/lib/extensions/discord.js/ExtendedUser.ts
@@ -1,32 +1,28 @@
import { User } from 'discord.js';
+import type { TanzaniteClient } from '../discord-akairo/TanzaniteClient.js';
+
+interface Extension {
+ /**
+ * Indicates whether the user is an owner of the bot.
+ */
+ isOwner(): boolean;
+ /**
+ * Indicates whether the user is a superuser of the bot.
+ */
+ isSuperUser(): boolean;
+}
declare module 'discord.js' {
- export interface User {
- /**
- * Indicates whether the user is an owner of the bot.
- */
- isOwner(): boolean;
- /**
- * Indicates whether the user is a superuser of the bot.
- */
- isSuperUser(): boolean;
+ export interface User extends Extension {
+ readonly client: TanzaniteClient;
}
}
-/**
- * Represents a user on Discord.
- */
-export class ExtendedUser extends User {
- /**
- * Indicates whether the user is an owner of the bot.
- */
+export class ExtendedUser extends User implements Extension {
public override isOwner(): boolean {
return this.client.isOwner(this);
}
- /**
- * Indicates whether the user is a superuser of the bot.
- */
public override isSuperUser(): boolean {
return this.client.isSuperUser(this);
}