n1ls
n1ls
CC#
Created by n1ls on 4/26/2024 in #help
Post file to Discord channel
I have it all complete already, just the upload was problematic as the files couldn't be read, but using http client fixed it. It could use a totally different design if mine is total crap though
45 replies
CC#
Created by n1ls on 4/26/2024 in #help
Post file to Discord channel
So the setting is the following: we share the save files in our channel. So every user needs to check which version is newer, local or remote and manually upload or download the most recent accordingly. Now I want a script which every user can run which checks which version is newer and uploads or downloads the files.
45 replies
CC#
Created by n1ls on 4/26/2024 in #help
Post file to Discord channel
I see, the project was really just a quick idea and without knowing too much about discord bots I just followed this way. What would be a more professional design? I just want to run a script now and then to send a few save files to a Channel and or download a few.
45 replies
CC#
Created by n1ls on 4/26/2024 in #help
Post file to Discord channel
Thanks for pointing this out. A lot of this needs cleaning
45 replies
CC#
Created by n1ls on 4/26/2024 in #help
Post file to Discord channel
Yeah I use a bot token...the script sends the request upon which the bot account posts the message. Is this design not common?
45 replies
CC#
Created by n1ls on 4/26/2024 in #help
Post file to Discord channel
thanks anyway^^
45 replies
CC#
Created by n1ls on 4/26/2024 in #help
Post file to Discord channel
so it should also work with my previous approach, when I use $fileStream = [System.IO.File]::OpenRead($local_file[1]) instead of $fileBytesFwl = [System.IO.File]::ReadAllBytes($local_file[0])
45 replies
CC#
Created by n1ls on 4/26/2024 in #help
Post file to Discord channel
because I am sending a file stream now?
45 replies
CC#
Created by n1ls on 4/26/2024 in #help
Post file to Discord channel
well, I am a little surprised: using HttpClient works, so I can load the save games now ...does this automatically mean the sent files are safely not corrupted? Like, in my mind I figure that I still might get an error at some point like "cant find asset..."
45 replies
CC#
Created by n1ls on 4/26/2024 in #help
Post file to Discord channel
yeah, I already read that^^ But might give it another try
45 replies
CC#
Created by n1ls on 4/26/2024 in #help
Post file to Discord channel
that is where I am stuck^^ How else would you do it 🙂
45 replies