Im working on a Discord bot and want to create this:
I have a string that reads the content of a local file, but I want to upload that file to a specific website (for example GitHub) and use it, instead of the local file (basically, I want to get rid of the local file and be able to use the uploaded file).
I have this simple line of code:
string[] contentFile = File.ReadAllLines("files/file.txt");
Can somebody help me out here?
Edit: The file contains the lines "1", "2", "3" (and so on), and I want to put these lines in a string array so that I can get access to "1" with contentFile[0]
, to "2" with contentFile[1]
and so on and so forth. It works perfect with a local file, but I do not know how to get access to the uploaded file and the lines within.