aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/fileutils/UpcomingChannelsManager.java
blob: 7c8ade7edc3e503e310fc47b67274595828b8276 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package fileutils;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;

public class UpcomingChannelsManager {
    public void addNewEntry(String type, String information, String discordChannelID){
        File f = new File("settings//upcomingChannels.txt");
        try {
            System.out.printf("Written data to upcomingChannels.txt");
            FileWriter fw = new FileWriter(f, true);
            fw.write(type + ":" + information + ":" + discordChannelID+"\n");
            fw.close();
        }
        catch(IOException e){
            System.out.println("Unable to open upcomingChannels.txt for writing");
        }
    }
}
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage