aboutsummaryrefslogtreecommitdiff
path: root/src/lib/extensions/discord.js/BushUser.ts
blob: 15a0d0317e4f4a0e90b029d48952f873115b3463 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { Partialize, User } from 'discord.js';
import { RawUserData } from 'discord.js/typings/rawDataTypes';
import { BushClient } from '../discord-akairo/BushClient';
import { BushDMChannel } from './BushDMChannel';

export type PartialBushUser = Partialize<BushUser, 'username' | 'tag' | 'discriminator' | 'isOwner' | 'isSuperUser'>;

export class BushUser extends User {
	public declare readonly client: BushClient;
	public declare readonly dmChannel: BushDMChannel | null;
	public constructor(client: BushClient, data: RawUserData) {
		super(client, data);
	}

	public isOwner(): boolean {
		return client.isOwner(this);
	}

	public isSuperUser(): boolean {
		return client.isSuperUser(this);
	}
}