Skip to content

Commit

Permalink
Delegate the operator [] to the parent class
Browse files Browse the repository at this point in the history
  • Loading branch information
Rapougnac committed Sep 7, 2024
1 parent b05027a commit e260cc3
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions lib/src/http/managers/emoji_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ import 'manager.dart';
abstract class EmojiManager extends Manager<Emoji> {
EmojiManager(super.config, super.client, {required super.identifier});

@override
PartialEmoji operator [](Snowflake id) => PartialEmoji(id: id, manager: this);

@override
Emoji parse(Map<String, Object?> raw) {
final isUnicode = raw['id'] == null;
Expand All @@ -39,9 +42,6 @@ class ApplicationEmojiManager extends EmojiManager {

ApplicationEmojiManager(super.config, super.client, {required this.applicationId}) : super(identifier: 'applications.$applicationId.emojis');

@override
PartialEmoji operator [](Snowflake id) => PartialEmoji(id: id, manager: this);

@override
Emoji parse(Map<String, Object?> raw) {
final emoji = super.parse(raw);
Expand Down Expand Up @@ -144,9 +144,6 @@ class GuildEmojiManager extends EmojiManager {

GuildEmojiManager(super.config, super.client, {required this.guildId}) : super(identifier: 'guilds.$guildId.emojis');

@override
PartialEmoji operator [](Snowflake id) => PartialEmoji(id: id, manager: this);

@override
Emoji parse(Map<String, Object?> raw) {
final emoji = super.parse(raw);
Expand Down

0 comments on commit e260cc3

Please sign in to comment.