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
149 stars 49 forks source link

Bot isn't claiming characters from namelist #182

Closed jodersi closed 2 years ago

jodersi commented 2 years ago

It's strange that this is happening because it was working before, and while I have added characters to the name list since then as well as removing the characters which have been claimed, I haven't changed the convention to which they're listed. More specifically, the bot doesn't even recognize that something from the name list was pulled in the first place, it just gives the typical someone else rolled in channel ID response, and the characters I have on my name list have all not been claimed. Any idea as to what went wrong?

jodersi commented 2 years ago

Update, it started working again when I added a couple more characters and turned it back on just to see if it would work, and then stopped working again when I did the same thing later. I feel like it has to be something with the way I'm entering in the characters, but I can't for the life of me think of how I can be entering it in wrong since it's always been in the same format and just seems to work or not arbitrarily.

vivinano commented 2 years ago

It depends if you have already claimed this seems like you might not have had a claim available hence it will stop searching until the next claim cycle this is added to prevent your user from looking like to much of a bot

jodersi commented 2 years ago

It depends if you have already claimed this seems like you might not have had a claim available hence it will stop searching until the next claim cycle this is added to prevent your user from looking like to much of a bot

In the instances where it happened I still had a claim, is there anything I could have done to make the bot think I had claimed when I hadn't?

vivinano commented 2 years ago

It is triggered on a update_message so if a message is updated by mudae that fit the criteria then maybe but other than that I haven't heard of any false triggers

If you can recreate it then I can fix otherwise can't fix what I can't reproduce

vivinano commented 2 years ago

So can't reproduce this issue can you provide screenshots of an "active" claim and a missed character , name in the settings , and a screenshot of the logs

jodersi commented 2 years ago

Sorry, forgot to send the comment I typed out a couple days ago. It happens when I add a name to the name list in the middle of the list instead of adding it to the end.

vivinano commented 2 years ago

And you have validated it with the json validator

jodersi commented 2 years ago

nope, how do I do this?

vivinano commented 2 years ago

So what I assume if your json is not validated then when it goes thru your list only the 1st character will be claimed as it stops when it hits the failure name

Sent from my iPhone

On Jul 18, 2022, at 3:32 PM, jodersi @.***> wrote:

 nope, how do I do this?

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

jodersi commented 2 years ago

ok, how do I validate it? can I use any validation tool online or is there something you recommend?

jodersi commented 2 years ago

also will I have to validate it every time I edit the file?

vivinano commented 2 years ago

If you have read the readme There is a online tool link that I’ve posted to minimize json errors so please refer to that

Sent from my iPhone

On Jul 18, 2022, at 3:36 PM, jodersi @.***> wrote:

 ok, how do I validate it? can I use any validation tool online or is there something you recommend?

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

jodersi commented 2 years ago

ok cool thanks, I'll run it through that and tell you if it works next time a name list character drops.

vivinano commented 2 years ago

also will I have to validate it every time I edit the file?

No I don't unless your very bad at json format then I would recommend it Of course

jodersi commented 2 years ago

the validator says that it's valid

jodersi commented 2 years ago

although it did change the format by making the list vertical instead of being in a single line

vivinano commented 2 years ago

Alright so now also keep in mind that name is exact match only and take a screenshot of what I listed above

Sent from my iPhone

On Jul 18, 2022, at 3:41 PM, jodersi @.***> wrote:

 the validator says that it's valid

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

jodersi commented 2 years ago

I went through and checked every name, they are all exact matches even down to capitalization

vivinano commented 2 years ago

And you positive your in a claim cycle and the issue is that is only take the 1st character and not the one in the middle ?

Sent from my iPhone

On Jul 18, 2022, at 4:03 PM, jodersi @.***> wrote:

 I went through and checked every name, they are all exact matches even down to capitalization

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

jodersi commented 2 years ago

I'm positive that I had a claim when the characters popped up, but its not that it only takes the 1st character its that it doesn't recognize that a character from the name list has been rolled when they roll

vivinano commented 2 years ago

Then you have other settings like min_kak or last minute kak setting enabled

Sent from my iPhone

On Jul 18, 2022, at 4:14 PM, jodersi @.***> wrote:

 I'm positive that I had a claim when the characters popped up, but its not that it only takes the 1st character its that it doesn't recognize that a character from the name list has been rolled when they roll

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

jodersi commented 2 years ago

Last minute kak is disabled and min_kak is set higher so high that nothing will ever have a kak value high enough to be claimed by it, I only want the bot claiming specific characters

vivinano commented 2 years ago

Figure out why the 1st character is being claimed it should state what triggers get triggered

Sent from my iPhone

On Jul 18, 2022, at 4:27 PM, jodersi @.***> wrote:

 Last minute kak is disabled and min_kak is set higher so high that nothing will ever have a kak value high enough to be claimed by it, I only want the bot claiming specific characters

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

jodersi commented 2 years ago

It's working now, maybe there was something wrong with the jsons format I didn't recognize that was fixed by the validator/formatting tool.

vivinano commented 2 years ago

Maybe the curly brackets unsure but glad it is fixed

jodersi commented 2 years ago

Maybe the curly brackets unsure but glad it is fixed

Ok, its been a while, but 3 months later I've realized what was wrong after a specific instance I encountered earlier today, and I went back to all the other cases of it not claiming in the past and it all lines up. I've realized that the problem that I had every time the bot failed to claim something is that the bot is refreshing the claim window an hour before the server refreshes the claim window. So our server refreshes claim every 3 hours at 3:00, 6:00, and 9:00, etc. while the bot is refreshing its claim window at 2:00, 5:00, and 8:00, etc. This has been making it so that if I claim something in the final rolls of a claim period, the bot won't work until the last hour of the next claim period. How can I fix this so that the bot is refreshing its claim period at the same time as the server?