File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ 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' ;
56
67/// Options for connecting to the Discord API.
78abstract class ApiOptions {
@@ -17,7 +18,7 @@ abstract class ApiOptions {
1718 /// The host at which the API can be found.
1819 ///
1920 /// This is always `discord.com` .
20- String get host => 'cors .discordworker-cfb.workers.dev' ;//'discord.com';
21+ String get host => UniversalPlatform .isWeb ? 'cors2 .discordworker-cfb.workers.dev' : "discord.com" ;//'discord.com'; cors.discordworker-cfb.workers.dev
2122
2223 /// The base URI relative to the [host] where the API can be found.
2324 String get baseUri => '/api/v$apiVersion ' ;
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ dependencies:
1818 runtime_type : ^1.0.1
1919 meta : ^1.9.1
2020 oauth2 : ^2.0.2
21+ universal_platform : ^1.1.0
2122
2223dev_dependencies :
2324 test : ^1.22.0
You can’t perform that action at this time.
0 commit comments