Changed the order and simplified message
This commit is contained in:
parent
4db7bb7082
commit
01edb18649
1 changed files with 2 additions and 7 deletions
|
@ -114,17 +114,12 @@ public class DiscordPlugin extends JavaPlugin implements IListener<ReadyEvent> {
|
||||||
System.out.println("title: " + title);
|
System.out.println("title: " + title);
|
||||||
System.out.println("distinguished: " + distinguished);
|
System.out.println("distinguished: " + distinguished);
|
||||||
System.out.println("url: " + url);
|
System.out.println("url: " + url);
|
||||||
if (distinguished != null && distinguished.equals("moderator"))
|
msgsb.insert(0, "A new post was submitted to the subreddit by " + author);
|
||||||
msgsb.append("A new mod post was submitted to the subreddit");
|
|
||||||
else
|
|
||||||
msgsb.append("A new post was submitted to the subreddit");
|
|
||||||
msgsb.append("\nAuthor: ").append(author).append("\nFlair: ").append(flair).append("\nTitle: ")
|
|
||||||
.append(title).append("\n").append(url);
|
|
||||||
lastannouncementtime = date;
|
lastannouncementtime = date;
|
||||||
File file = new File("TBMC", "DiscordRedditLastAnnouncement.txt");
|
File file = new File("TBMC", "DiscordRedditLastAnnouncement.txt");
|
||||||
Files.write(lastannouncementtime + "", file, StandardCharsets.UTF_8);
|
Files.write(lastannouncementtime + "", file, StandardCharsets.UTF_8);
|
||||||
channel.sendMessage(msgsb.toString()); // TODO: Mod msgsb for announcements
|
|
||||||
}
|
}
|
||||||
|
channel.sendMessage(msgsb.toString()); // TODO: Mod msgsb for announcements
|
||||||
try {
|
try {
|
||||||
Thread.sleep(10000);
|
Thread.sleep(10000);
|
||||||
} catch (InterruptedException ex) {
|
} catch (InterruptedException ex) {
|
||||||
|
|
Loading…
Reference in a new issue