qixils / gamebot

C# Discord bot that automates games
MIT License
3 stars 2 forks source link

Fix many issues #17

Closed Bottersnike closed 7 years ago

Bottersnike commented 7 years ago

Fix https://github.com/Noahkiq/gamebot/issues/2, https://github.com/Noahkiq/gamebot/issues/7, https://github.com/Noahkiq/gamebot/issues/8, https://github.com/Noahkiq/gamebot/issues/14 and https://github.com/Noahkiq/gamebot/issues/18 Update to Discord.NET version 1.0.0-rc Requires .NET framework version > 4.6 (I used 4.6.2). I have not yet tested using mono (because I don't have it) and thus if you're going to pull this, it might be worth putting it in a new branch.

I also apologize for the fact that it's all one large commit. It was many (separated by . in the commit message), but because I download ZIPed instead of forking, I had to fork it and then merge changes manually. Trust me, I tried to get my commits to come across as more than one, but I couldn't work out how.

Bottersnike commented 7 years ago

For installation using mono: First make sure that bot-token.txt is copied across. cd into the root dir. Run nuget restore . to download all of the packages. Run xbuild to build. Then cd into ./gamebot/bin/Debug and run the executable.

Technochips commented 7 years ago

well we use monodevelop to compile it

Bottersnike commented 7 years ago

Okay I can confirm that it works with the latest version of mono.

qixils commented 7 years ago

Issue 1: Can't successfully run/compile using the current hosting solution. (Mono 4.4.2, Ubuntu 17.04)
Details: Doesn't compile correctly with Mono 4.4.2's xbuild, even after doing a nuget restore .
image

Issue 2: When using a build successfully compiled by @Technochips using Mono 5.0.0, bot immediately crashed due to a missing winhttp.dll

Issue 3: @Technochips could not successfully run the bot using Mono 5.0.0 (latest mono). He got this when trying to run the bot:
Discord.Net.HttpException: The server responded with error 400: BadRequest
This is not much of a surprise as Discord.Net is known to not behave kindly with newer versions of mono.

Bottersnike commented 7 years ago

Hmm. I'll have a look into it. I installed mono a few hours ago so it's definatly at the latest version for me. If you want, I can have a look to see what all the dlls etc. that it's using are and send over versions. When you installed all the nuget packages, were there any errors or warnings?

Technochips commented 7 years ago

at the same time, we are on linux, and that might be no good

Bottersnike commented 7 years ago

Nahh. I'm fairly sure the point of mono is that it works on both. Are you using a user or bot account to run it on? If you're using a user account, check the email for that account as 400 is the error thrown for "new device".

Technochips commented 7 years ago

well geez, that's a lot of commits might going to review it tomorrow, soon™

qixils commented 7 years ago

Reportedly works on .NET core which doesn't support host OS yet (Ubuntu 17.04) - will properly test/merge when support eventually:tm: comes

qixils commented 7 years ago

Dotnet Core for Ubuntu doesn't contain the required files to run net46 applications, which is what this application is based off of. Therefore, these changes can't currently be used in the current hosting environment.

And no, botter, don't go off and port this to python. i dont think mr @Technochips wants to deal with that

Bottersnike commented 7 years ago

:D I won't. Don't worry.