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

Simple kakera implementation is not working #246

Closed xd-mau5 closed 2 months ago

xd-mau5 commented 1 year ago

Since i saw the commit of the kakera implementation i tried, but for me it doesn't work at all as you can see in the logs and the image image (I clicked the kakera button)

Jul 11 13:44:55 mau5-v2 bash[184330]: True: Waifu rolling : 1050623065127657482
Jul 11 13:45:52 mau5-v2 bash[184330]: Our user rolled in 1050623065127657482
Jul 11 13:45:53 mau5-v2 bash[184330]: Our user rolled in 1050623065127657482
Jul 11 13:45:54 mau5-v2 bash[184330]: Our user rolled in 1050623065127657482
Jul 11 13:45:57 mau5-v2 bash[184330]: Our user rolled in 1050623065127657482
Jul 11 13:45:59 mau5-v2 bash[184330]: Our user rolled in 1050623065127657482
Jul 11 13:46:02 mau5-v2 bash[184330]: Our user rolled in 1050623065127657482
Jul 11 13:46:04 mau5-v2 bash[184330]: Our user rolled in 1050623065127657482
Jul 11 13:46:07 mau5-v2 bash[184330]: Our user rolled in 1050623065127657482
Jul 11 13:46:09 mau5-v2 bash[184330]: Our user rolled in 1050623065127657482
Jul 11 13:46:12 mau5-v2 bash[184330]: Our user rolled in 1050623065127657482
Jul 11 13:46:14 mau5-v2 bash[184330]: Our user rolled in 1050623065127657482
Jul 11 13:46:17 mau5-v2 bash[184330]: Our user rolled in 1050623065127657482
Jul 11 13:46:19 mau5-v2 bash[184330]: Our user rolled in 1050623065127657482
Jul 11 13:46:22 mau5-v2 bash[184330]: Our user rolled in 1050623065127657482
Jul 11 13:46:24 mau5-v2 bash[184330]: Our user rolled in 1050623065127657482
Jul 11 13:46:27 mau5-v2 bash[184330]: Our user rolled in 1050623065127657482
Jul 11 13:46:29 mau5-v2 bash[184330]: Our user rolled in 1050623065127657482
Jul 11 13:46:32 mau5-v2 bash[184330]: Our user rolled in 1050623065127657482
Jul 11 13:46:34 mau5-v2 bash[184330]: Our user rolled in 1050623065127657482
Jul 11 13:46:38 mau5-v2 bash[184330]: Our user rolled in 1050623065127657482
Jul 11 13:46:48 mau5-v2 bash[184330]: Our user rolled in 1050623065127657482

Looks like it depends on the guildID

vivinano commented 1 year ago

It looks like it clicked the kakera ?

vivinano commented 1 year ago

I changed the guild id call to using a get method like the character sniping uses we will see if it works now.

xd-mau5 commented 1 year ago

I changed the guild id call to using a get method like the character sniping uses we will see if it works now.

Tried and still doesn't do anything image

Jul 11 14:56:10 mau5-v2 bash[207375]: 7200 : pokerolling : 1050623065127657482
Jul 11 14:56:13 mau5-v2 bash[207375]: 72000 : daily_rolling : 1050623065127657482
Jul 11 14:56:31 mau5-v2 bash[207375]: Our user rolled in 1050623065127657482
Jul 11 14:56:32 mau5-v2 bash[207375]: Our user rolled in 1050623065127657482
Jul 11 14:56:33 mau5-v2 bash[207375]: Our user rolled in 1050623065127657482
Jul 11 14:56:34 mau5-v2 bash[207375]: Our user rolled in 1050623065127657482
Jul 11 14:56:40 mau5-v2 bash[207375]: Our user rolled in 1050623065127657482
Jul 11 14:56:47 mau5-v2 bash[207375]: Our user rolled in 1050623065127657482
Jul 11 14:56:48 mau5-v2 bash[207375]: Our user rolled in 1050623065127657482
Jul 11 14:56:49 mau5-v2 bash[207375]: Our user rolled in 1050623065127657482
Jul 11 14:56:50 mau5-v2 bash[207375]: Our user rolled in 1050623065127657482
Jul 11 14:56:50 mau5-v2 bash[207375]: Our user rolled in 1050623065127657482
Jul 11 14:56:51 mau5-v2 bash[207375]: Our user rolled in 1050623065127657482
Jul 11 14:56:52 mau5-v2 bash[207375]: Our user rolled in 1050623065127657482
Jul 11 14:56:58 mau5-v2 bash[207375]: Our user rolled in 1050623065127657482
Jul 11 14:56:59 mau5-v2 bash[207375]: Our user rolled in 1050623065127657482
Jul 11 14:57:01 mau5-v2 bash[207375]: Our user rolled in 1050623065127657482
Jul 11 14:57:02 mau5-v2 bash[207375]: Our user rolled in 1050623065127657482
Jul 11 14:57:03 mau5-v2 bash[207375]: Our user rolled in 1050623065127657482
Jul 11 14:57:04 mau5-v2 bash[207375]: Our user rolled in 1050623065127657482
Jul 11 14:57:05 mau5-v2 bash[207375]: Our user rolled in 1050623065127657482
Jul 11 14:57:06 mau5-v2 bash[207375]: Our user rolled in 1050623065127657482
Jul 11 14:57:06 mau5-v2 bash[207375]: True: Waifu rolling : 1050623065127657482
vivinano commented 1 year ago

is it in your kakera vari list

xd-mau5 commented 1 year ago

is it in your kakera vari list

This is my current config for the kakera, is the same as the repo

"emoji_list":[
      "kakera", 
      "kakeraT",
      "kakeraG",
      "kakeraY",
      "kakeraO",
      "kakeraR",
      "kakeraW",
      "kakeraL"
   ],
   "soulemoji_list":[
      "kakeraO",
      "kakeraR",
      "KakeraW",
      "KakeraL"
   ],
vivinano commented 1 year ago

unsure what is going on there try to lower the kakeravari also maybe its a caps issue

xd-mau5 commented 1 year ago

This is my full settings without token

{
   "token":"token",
   "channel_ids":[
      1050623065127657482
   ],
   "slash_ids":[
      1050611814536331334
   ],
   "slash_guild_ids":[
      1050611814536331334
   ],
   "claim_delay":0,
   "kak_delay":0,
   "use_emoji":"<:keqing_love:795077041761288214>",
   "roll_this":"ma",
   "rolling":"True",
   "slash_rolling":"True",
   "pkmrolling":"True",
   "series_list":[
   ],
   "namelist":[
   ],
   "emoji_list":[
      "kakera", 
      "kakeraT",
      "kakeraG",
      "kakeraY",
      "kakeraO",
      "kakeraR",
      "kakeraW",
      "kakeraL"
   ],
   "soulemoji_list":[
      "kakeraO",
      "kakeraR",
      "KakeraW",
      "KakeraL"
   ],
   "min_kak":150,
   "Last_True":"False",
   "last_claim_min": 61,
   "min_kak_last_min": 10
}

I don't see anything wrong

JuliaYuki commented 1 year ago

"emoji_list": [ "Kakera", "KakeraG", "KakeraT", "KakeraY", "KakeraO", "KakeraR", "KakeraW", "KakeraL" ], "soulemoji_list": [ "KakeraP", "KakeraY", "KakeraO", "KakeraR", "KakeraW", "KakeraL" ],

I saw that some words had the letter "k" in lowercase and others in uppercase. I tried uppercase and then lowercase. None of the ways worked to react to kakera.

Nicksw21 commented 1 year ago

Did you guys manage to fix the kakera react issue?

Nixeld commented 1 year ago

image Quick fix. Add the following code there.

        snipe_delay = channel_settings[int(channelid)]['kak_snipe'][1]

        if butts.components != [] :
            buttMoji = butts.components[0]["components"][0]["emoji"]["name"]
            if buttMoji.lower() in KakeraVari:
                time.sleep(snipe_delay+1)
                bot.click(
                aId,
                channelID=m["channel_id"],
                guildID=m.get("guild_id"),
                messageID=m["id"],
                messageFlags=m["flags"],
                data=butts.getButton(emojiName=buttMoji),
                )

Basically just moved the code for clicking on the button to the top because it wasn't reaching the bottom when a button is on the message for some reason.

VineST commented 1 year ago

Nixeld, thank you! I missed the .lower() at first and was confused at it still failing to match the kakeras to my list of desired reacts. It being case sensitive explains that. Working great now!

VineST commented 1 year ago

image The kakera code still works almost always, but occasionally it randomly fails to click a button. I added two debug lines to try identifying the issue, but all looks good on the code end. Later in that rolling session, 2 yellow and 1 purple appeared and were properly interacted with. (Not relevant to this issue, but purple isn't in the config by default—I decided to add that one, because it's literally free, and removed blue/teal/green).

vivinano commented 7 months ago

it just makes it a little harder due to buttons not having their own gateway as of yet. when i have more time ill look into more ways to solve the issues but currently i havent had the downtime in my personal life