Small docs, typing fixes; Add missing audit log entry types

This commit is contained in:
Szymon Uglis 2020-12-03 01:33:47 +01:00 committed by Szymon Uglis
parent a5bd5661b3
commit 7850b5debd
No known key found for this signature in database
GPG key ID: 112376C5BEE91FE2
6 changed files with 11 additions and 4 deletions

View file

@ -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});
}
}

View file

@ -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;

View file

@ -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();

View file

@ -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;

View file

@ -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;

View file

@ -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);