From 955f054cf7b705e7392365431494c450a0edab13 Mon Sep 17 00:00:00 2001 From: Szymon Uglis Date: Thu, 25 Mar 2021 22:27:38 +0100 Subject: [PATCH] Update nyxx.commander to nyxx 1.1.0-dev.5 --- nyxx.commander/lib/src/CommandContext.dart | 6 +++--- nyxx.commander/pubspec.yaml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/nyxx.commander/lib/src/CommandContext.dart b/nyxx.commander/lib/src/CommandContext.dart index ac600658..12315e4d 100644 --- a/nyxx.commander/lib/src/CommandContext.dart +++ b/nyxx.commander/lib/src/CommandContext.dart @@ -20,7 +20,7 @@ class CommandContext { : null; /// Reference to client - Nyxx get client => channel.client; + Nyxx get client => channel.client as Nyxx; /// Shard on which message was sent int get shardId => this.guild != null ? this.guild!.shard.id : 0; @@ -139,7 +139,7 @@ class CommandContext { Future> awaitEmojis(Message msg, Duration duration){ final collectedEmoji = {}; return Future>(() async { - await for (final event in msg.client.onMessageReactionAdded.where((evnt) => evnt.message != null && evnt.message!.id == msg.id)) { + await for (final event in (msg.client as Nyxx).onMessageReactionAdded.where((evnt) => evnt.message != null && evnt.message!.id == msg.id)) { if (collectedEmoji.containsKey(event.emoji)) { // TODO: NNBD: weird stuff var value = collectedEmoji[event.emoji]; @@ -161,7 +161,7 @@ class CommandContext { /// Waits for first [TypingEvent] and returns it. If timed out returns null. /// Can listen to specific user by specifying [user] Future waitForTyping(User user, {Duration timeout = const Duration(seconds: 30)}) => - Future(() => user.client.onTyping.firstWhere((e) => e.user == user && e.channel == this.channel)).timeout(timeout, onTimeout: () => null); + Future(() => (user.client as Nyxx).onTyping.firstWhere((e) => e.user == user && e.channel == this.channel)).timeout(timeout, onTimeout: () => null); /// Gets all context channel messages that satisfies [predicate]. /// diff --git a/nyxx.commander/pubspec.yaml b/nyxx.commander/pubspec.yaml index aeb62311..1bd7761a 100644 --- a/nyxx.commander/pubspec.yaml +++ b/nyxx.commander/pubspec.yaml @@ -12,4 +12,4 @@ environment: dependencies: http: "^0.13.0" logging: "^1.0.0" - nyxx: "1.1.0-dev.4" + nyxx: "1.1.0-dev.5"