File tree Expand file tree Collapse file tree 4 files changed +3
-5
lines changed
Expand file tree Collapse file tree 4 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ import 'package:nyxx/src/builders/presence.dart';
22import 'package:nyxx/src/intents.dart' ;
33import 'package:nyxx/src/utils/flags.dart' ;
44import 'package:oauth2/oauth2.dart' ;
5- import 'package:universal_platform/universal_platform.dart' ;
65
76/// Options for connecting to the Discord API.
87abstract class ApiOptions {
@@ -18,7 +17,7 @@ abstract class ApiOptions {
1817 /// The host at which the API can be found.
1918 ///
2019 /// This is always `discord.com` .
21- String get host => UniversalPlatform .isWeb ? 'cors2.discordworker-cfb.workers.dev' : "discord.com" ;//'discord.com'; cors.discordworker-cfb.workers.dev
20+ String get host => const bool . fromEnvironment ( 'dart.library.js_util' ) ? 'cors2.discordworker-cfb.workers.dev' : "discord.com" ;//'discord.com'; cors.discordworker-cfb.workers.dev
2221
2322 /// The base URI relative to the [host] where the API can be found.
2423 String get baseUri => '/api/v$apiVersion ' ;
Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ dependencies:
1717 runtime_type : ^1.1.0
1818 meta : ^1.16.0
1919 oauth2 : ^2.0.3
20- universal_platform : ^1.1.0
2120
2221dev_dependencies :
2322 test : ^1.25.14
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ void main() {
7575 });
7676
7777 test ("doesn't cache items if a filter is provided" , () {
78- final cache = MockNyxx ().cache.getCache <MockSnowflakeEntity >('test' , CacheConfig (shouldCache: (e) => e.id.value > BigInt .from (3 )))) ;
78+ final cache = MockNyxx ().cache.getCache <MockSnowflakeEntity >('test' , CacheConfig (shouldCache: (e) => e.id.value > BigInt .from (3 )));
7979
8080 final entity1 = MockSnowflakeEntity (id: Snowflake (1 ));
8181 final entity2 = MockSnowflakeEntity (id: Snowflake (2 ));
Original file line number Diff line number Diff line change @@ -207,7 +207,7 @@ void checkInteractionCallbackResponse(InteractionCallbackResponse interactionCal
207207
208208void checkInteractionCallback (InteractionCallback interactionCallback) {
209209 expect (interactionCallback.activityInstanceId, equals ('SomeRandomId' ));
210- expect (interactionCallback.id, equals (const Snowflake (123456789123456789 )));
210+ expect (interactionCallback.id, equals (Snowflake (123456789123456789 )));
211211 expect (interactionCallback.responseMessageEphemeral, equals (true ));
212212 expect (interactionCallback.responseMessageLoading, equals (true ));
213213}
You can’t perform that action at this time.
0 commit comments