Skip to content

Commit d508516

Browse files
committed
Add jda platform
1 parent a354fed commit d508516

3 files changed

Lines changed: 10 additions & 5 deletions

File tree

src/main/java/net/dv8tion/jda/api/JDABuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public class JDABuilder
8888
protected Compression compression = Compression.ZLIB;
8989
protected Activity activity = null;
9090
protected OnlineStatus status = OnlineStatus.ONLINE;
91-
protected Platform platform = Platform.DESKTOP;
91+
protected Platform platform = Platform.JDA;
9292
protected boolean idle = false;
9393
protected int maxReconnectDelay = 900;
9494
protected int largeThreshold = 250;

src/main/java/net/dv8tion/jda/api/Platform.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
* What platform is the discord client running on.
77
*/
88
public enum Platform {
9+
/**
10+
* Default
11+
*/
12+
JDA("JDA"),
13+
914
/**
1015
*
1116
*/
@@ -46,12 +51,12 @@ public String getKey()
4651

4752
/**
4853
* Will get the {@link net.dv8tion.jda.api.Platform Platform} from the provided key.
49-
* <br>If the provided key does not have a matching Platform, this will return {@link net.dv8tion.jda.api.Platform#DESKTOP DESKTOP}
54+
* <br>If the provided key does not have a matching Platform, this will return {@link net.dv8tion.jda.api.Platform#JDA JDA}
5055
*
5156
* @param key
5257
* The key relating to the {@link net.dv8tion.jda.api.Platform Platform} we wish to retrieve.
5358
*
54-
* @return The matching {@link net.dv8tion.jda.api.Platform Platform}. If there is no match, returns {@link net.dv8tion.jda.api.Platform#DESKTOP DESKTOP}.
59+
* @return The matching {@link net.dv8tion.jda.api.Platform Platform}. If there is no match, returns {@link net.dv8tion.jda.api.Platform#JDA JDA}.
5560
*/
5661
@Nonnull
5762
public static Platform fromKey(@Nonnull String key)
@@ -63,6 +68,6 @@ public static Platform fromKey(@Nonnull String key)
6368
return platform;
6469
}
6570
}
66-
return Platform.DESKTOP;
71+
return Platform.JDA;
6772
}
6873
}

src/main/java/net/dv8tion/jda/internal/JDAImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ public JDAImpl(
156156
AuthorizationConfig authConfig, SessionConfig sessionConfig,
157157
ThreadingConfig threadConfig, MetaConfig metaConfig, RestConfig restConfig)
158158
{
159-
this(authConfig, sessionConfig, threadConfig, metaConfig, restConfig, Platform.DESKTOP);
159+
this(authConfig, sessionConfig, threadConfig, metaConfig, restConfig, Platform.JDA);
160160
}
161161

162162
public JDAImpl(

0 commit comments

Comments
 (0)