vivinano / MudaeAutoBot

python bot that uses strictly the **Discord API** to Roll,Claim,and Kakera Snipe in Mudae. 5/10/21 project converted over to discum library
Apache License 2.0
152 stars 49 forks source link

Errors #46

Closed byronsanity closed 3 years ago

byronsanity commented 3 years ago

Traceback (most recent call last): File "D:\Downloads\Compressed\MudaeAutoBot-main\MudaeAutoBot-main\MudaeAutoBot.py", line 29, in settings = json.load(jsonf) File "C:\Users\HIGH-GAMING\AppData\Local\Programs\Python\Python39\lib\json__init.py", line 293, in load return loads(fp.read(), File "C:\Users\HIGH-GAMING\AppData\Local\Programs\Python\Python39\lib\json\init__.py", line 346, in loads return _default_decoder.decode(s) File "C:\Users\HIGH-GAMING\AppData\Local\Programs\Python\Python39\lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "C:\Users\HIGH-GAMING\AppData\Local\Programs\Python\Python39\lib\json\decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 17 column 4 (char 376)

This is what I get when trying to run it.

vivinano commented 3 years ago

there an issue with your json file setting

you can use a json validator and see if you missing commas or there a spacing issue or something

byronsanity commented 3 years ago

Okay will try. Will update you on this. Thanks!

byronsanity commented 3 years ago

Now I get this. Exception ignored in thread started by: <bound method GatewayServer._response_loop of <discum.gateway.gateway.GatewayServer object at 0x000001B688913B50>> Traceback (most recent call last): File "C:\Users\HIGH-GAMING\AppData\Roaming\Python\Python39\site-packages\discum\gateway\gateway.py", line 288, in _response_loop func(resp) File "D:\Downloads\Compressed\MudaeAutoBot-main\MudaeAutoBot-main\MudaeAutoBot.py", line 603, in on_message msg = get_server_settings(gid,matched_channel) File "D:\Downloads\Compressed\MudaeAutoBot-main\MudaeAutoBot-main\MudaeAutoBot.py", line 138, in get_server_settings msgs = bot.searchMessages(guild_id,userID=[mudae],textSearch="($togglehentai)").json()['messages'] TypeError: searchMessages() got an unexpected keyword argument 'userID'

Sorry not used to debugging Python as I just started in learning it.

vivinano commented 3 years ago

So I’m working on a few thing before pushing the commit but the dependency “Discum” changed the keyword on their end so eventually I will push the commit but all it is for now is changing

UserID to authorID in the searchMessageFunctions

byronsanity commented 3 years ago

Thanks for your help. It works now but problem is that it auto claims the first thing I roll. It does not follow the emoji nor the likelist I setup for it to claim. It just claims the very first roll I get.

vivinano commented 3 years ago

In terms of kakera ? Or characters in the character roll it should print on the console why it is sniping it whether it be from kak value or from char list etc etc

Sent from my iPhone

On Jun 2, 2021, at 3:45 AM, byronsanity @.***> wrote:

 Thanks for your help. It works now but problem is that it auto claims the first thing I roll. It does not follow the emoji nor the likelist I setup for it to claim. It just claims the very first roll I get.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

byronsanity commented 3 years ago

I removed the "" in the anime list and It kinda work but returns ignore exceptions in the console. Is this okay? When rolling, it does not print the owner rolled but rather prints the exceptions.

vivinano commented 3 years ago

yeah so I have it print ignoring character just to have like a log of what was rolled and such it should be fine. feel free to post a screenshot of the console if you want to be sure. and yeah for settings_mudae

you should have it empty completly like variable = [ ] cause variable = [""] will cause issues variable = [" "] will probably make anything with a space valid and cause false positives

personally I like just doing like variable = ["aaaaaaaaa"] since that will never be true in the grand scheme of thing but still keep what the variable is suppose to look like

byronsanity commented 3 years ago

image heres the settings image this is what i get now

vivinano commented 3 years ago

download my latest version of the code and then also download latest version of discum

"discum had a few changes in terms of keywords that been changed"

byronsanity commented 3 years ago

It worked. It just displays the "File not found using different method" tho it's rolling just not sure about claiming. Does this snipe other's rolls?

vivinano commented 3 years ago

yes it snipes any rolls that fit the criteria

byronsanity commented 3 years ago

So is the "file not found using different method okay?

vivinano commented 3 years ago

Yeah i set that up today to keep basically if file not found it will attempt to save ur $setting config to a file to use for later instead of searching it constantly

byronsanity commented 3 years ago

Aight thank you will be closing this now. Thanks again!

byronsanity commented 3 years ago

Just last question. What do I have to set the min kak for the bot to prioritize the likelist?

vivinano commented 3 years ago

what do u mean the likelist ? like make it only do char name snipe ?? set it to like a really high amount like 9999

byronsanity commented 3 years ago

Yup the namelist in the settings. Sorry I thought it was likelist. So I set it to 9999 then it only snipes the names in the namelist?

vivinano commented 3 years ago

yup your good to go also keep in mind that if 2 things happen at once it will do a 1st come 1st serve basis and ignore the other attempt this is normal functionality so before making an issue on character was ignored please confirm these other factors

byronsanity commented 3 years ago

what do you mean 2 things happen at once? like 2 chars from namelist was rolled?

vivinano commented 3 years ago

yeah so if 2 or 3 rolled at one time it will just attempt until succeeds then get put on a wait timer until the next claim window

byronsanity commented 3 years ago

Yup I understand that limitation. Thanks again! Closing issue.