Small docs, typing fixes; Add missing audit log entry types
This commit is contained in:
parent
a5bd5661b3
commit
7850b5debd
|
@ -109,4 +109,4 @@ class BasicCommandHandler extends CommandHandler {
|
|||
|
||||
/// Basic implementation of command handler. Used internally in library.
|
||||
BasicCommandHandler(this.name, this.commandHandler, {this.aliases = const [], this.beforeHandler, this.afterHandler, this.parent});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ class DiscordColor {
|
|||
int get hashCode => _value.hashCode;
|
||||
|
||||
@override
|
||||
bool operator ==(other) => other is DiscordColor && other._value == this._value;
|
||||
bool operator ==(dynamic other) => other is DiscordColor && other._value == this._value;
|
||||
|
||||
/// Color of null, literally null.
|
||||
static const DiscordColor? none = null;
|
||||
|
|
|
@ -56,7 +56,7 @@ class Snowflake implements Comparable<Snowflake> {
|
|||
String toString() => _id.toString();
|
||||
|
||||
@override
|
||||
bool operator ==(other) {
|
||||
bool operator ==(dynamic other) {
|
||||
if (other is Snowflake) return other.id == this._id;
|
||||
if (other is int) return other == this._id;
|
||||
if (other is String) return other == this._id.toString();
|
||||
|
|
|
@ -19,7 +19,7 @@ class SnowflakeEntity {
|
|||
String toString() => id.toString();
|
||||
|
||||
@override
|
||||
bool operator ==(other) {
|
||||
bool operator ==(dynamic other) {
|
||||
if (other is SnowflakeEntity) return id == other.id;
|
||||
if (other is String) return id.id.toString() == other;
|
||||
if (other is int) return id.id == other;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
part of nyxx;
|
||||
|
||||
/// Object of team that manages given app
|
||||
class AppTeam extends SnowflakeEntity {
|
||||
/// Hash of team icon
|
||||
late final String? iconHash;
|
||||
|
|
|
@ -68,6 +68,12 @@ class AuditLogEntryType extends IEnum<int> {
|
|||
static const AuditLogEntryType emojiUpdate = AuditLogEntryType._create(61);
|
||||
static const AuditLogEntryType emojiDelete = AuditLogEntryType._create(62);
|
||||
static const AuditLogEntryType messageDelete = AuditLogEntryType._create(72);
|
||||
static const AuditLogEntryType messageBulkDelete = AuditLogEntryType._create(73);
|
||||
static const AuditLogEntryType messagePin = AuditLogEntryType._create(74);
|
||||
static const AuditLogEntryType messageUnpin = AuditLogEntryType._create(75);
|
||||
static const AuditLogEntryType integrationCreate = AuditLogEntryType._create(80);
|
||||
static const AuditLogEntryType integrationUpdate = AuditLogEntryType._create(81);
|
||||
static const AuditLogEntryType integrationDelete = AuditLogEntryType._create(82);
|
||||
|
||||
const AuditLogEntryType._create(int value) : super(value);
|
||||
|
||||
|
|
Loading…
Reference in a new issue