mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 10:03:31 +01:00
feat: add missing v13 component methods (#7466)
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com> Co-authored-by: Rodry <38259440+ImRodry@users.noreply.github.com> Co-authored-by: Antonio Román <kyradiscord@gmail.com>
This commit is contained in:
@@ -7,6 +7,7 @@ import {
|
||||
type APIButtonComponentWithCustomId,
|
||||
} from 'discord-api-types/v9';
|
||||
import { Component } from '../Component';
|
||||
import isEqual from 'fast-deep-equal';
|
||||
|
||||
/**
|
||||
* Represents a non-validated button component
|
||||
@@ -118,4 +119,11 @@ export class UnsafeButtonComponent extends Component<Partial<APIButtonComponent>
|
||||
...this.data,
|
||||
} as APIButtonComponent;
|
||||
}
|
||||
|
||||
public equals(other: APIButtonComponent | UnsafeButtonComponent) {
|
||||
if (other instanceof UnsafeButtonComponent) {
|
||||
return isEqual(other.data, this.data);
|
||||
}
|
||||
return isEqual(other, this.data);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user