Skip to content

Commit

Permalink
Finishing touches
Browse files Browse the repository at this point in the history
  • Loading branch information
mufinlive committed Jul 27, 2022
1 parent 27d3d09 commit 192a16d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ File will be in `target/AutoPublishWebhook.jar`.

### Running

Use the `-Ddiscord.token` flag to specify the Discord token.
Use the `-Ddiscordtoken` flag to specify the Discord token.

```bash
$ java -Ddiscord.token=<token> -jar target/AutoPublishWebhook.jar
$ java -Ddiscordtoken=<token> -jar target/AutoPublishWebhook.jar
```
20 changes: 19 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>md.setup</groupId>
<artifactId>AutoPublishWebhook</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.0</version>

<properties>
<maven.compiler.source>17</maven.compiler.source>
Expand All @@ -31,6 +31,24 @@
<configuration>
<outputFile>target/AutoPublishWebhook.jar</outputFile>
<createDependencyReducedPom>false</createDependencyReducedPom>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<Main-Class>md.setup.autopublishwebhook.AutoPublishWebhook</Main-Class>
</manifestEntries>
</transformer>
</transformers>
</configuration>
</plugin>
</plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class AutoPublishWebhook extends ListenerAdapter {

public static void main(String[] args) throws LoginException, InterruptedException {
JDA jda = JDABuilder
.createDefault(System.getProperty("discord.token"))
.createDefault(System.getProperty("discordtoken"))
.enableIntents(GatewayIntent.GUILD_MESSAGES, GatewayIntent.MESSAGE_CONTENT)
.addEventListeners(new AutoPublishWebhook())
.setStatus(OnlineStatus.DO_NOT_DISTURB)
Expand Down

0 comments on commit 192a16d

Please sign in to comment.