Fix reading of API token.
This commit is contained in:
parent
52e34493bd
commit
000e0e5d5c
|
@ -10,7 +10,7 @@
|
|||
<goal>org.codehaus.mojo:exec-maven-plugin:1.5.0:exec</goal>
|
||||
</goals>
|
||||
<properties>
|
||||
<exec.args>-classpath %classpath moe.nekojimi.chords.Main ODkwNjU5MjI2NDE2OTg0MDY0.YUzBCw.jHZWpIZSYeaYA7Sc7h93W_jV-rk</exec.args>
|
||||
<exec.args>-classpath %classpath moe.nekojimi.chords.Main -token ODkwNjU5MjI2NDE2OTg0MDY0.YUzBCw.jHZWpIZSYeaYA7Sc7h93W_jV-rk</exec.args>
|
||||
<exec.executable>java</exec.executable>
|
||||
</properties>
|
||||
</action>
|
||||
|
@ -24,7 +24,7 @@
|
|||
<goal>org.codehaus.mojo:exec-maven-plugin:1.5.0:exec</goal>
|
||||
</goals>
|
||||
<properties>
|
||||
<exec.args>-agentlib:jdwp=transport=dt_socket,server=n,address=${jpda.address} -classpath %classpath moe.nekojimi.chords.Main ODkwNjU5MjI2NDE2OTg0MDY0.YUzBCw.jHZWpIZSYeaYA7Sc7h93W_jV-rk</exec.args>
|
||||
<exec.args>-agentlib:jdwp=transport=dt_socket,server=n,address=${jpda.address} -classpath %classpath moe.nekojimi.chords.Main -token ODkwNjU5MjI2NDE2OTg0MDY0.YUzBCw.jHZWpIZSYeaYA7Sc7h93W_jV-rk</exec.args>
|
||||
<exec.executable>java</exec.executable>
|
||||
<jpda.listen>true</jpda.listen>
|
||||
</properties>
|
||||
|
@ -39,7 +39,7 @@
|
|||
<goal>org.codehaus.mojo:exec-maven-plugin:1.5.0:exec</goal>
|
||||
</goals>
|
||||
<properties>
|
||||
<exec.args>-classpath %classpath ${packageClassName} ODkwNjU5MjI2NDE2OTg0MDY0.YUzBCw.jHZWpIZSYeaYA7Sc7h93W_jV-rk</exec.args>
|
||||
<exec.args>-classpath %classpath moe.nekojimi.chords.Main -token ODkwNjU5MjI2NDE2OTg0MDY0.YUzBCw.jHZWpIZSYeaYA7Sc7h93W_jV-rk</exec.args>
|
||||
<exec.executable>java</exec.executable>
|
||||
</properties>
|
||||
</action>
|
||||
|
|
|
@ -25,7 +25,7 @@ import com.beust.jcommander.Parameter;
|
|||
public class CommandOptions
|
||||
{
|
||||
|
||||
@Parameter(description = "The API token for Discord.", required = true)
|
||||
@Parameter(names = "-token", description = "The API token for Discord.", required = true)
|
||||
private String token;
|
||||
|
||||
@Parameter(names = "-local-addr", description = "The local address to bind to.")
|
||||
|
|
|
@ -88,7 +88,7 @@ public final class Main extends ListenerAdapter
|
|||
GatewayIntent.GUILD_MEMBERS
|
||||
);
|
||||
|
||||
JDABuilder builder = JDABuilder.createDefault(args[0], intents);
|
||||
JDABuilder builder = JDABuilder.createDefault(options.getToken(), intents);
|
||||
|
||||
// Disable parts of the cache
|
||||
builder.disableCache(CacheFlag.MEMBER_OVERRIDES);
|
||||
|
|
Loading…
Reference in New Issue