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
142 stars 46 forks source link

List index out of range #237

Closed KosakiAjami closed 1 year ago

KosakiAjami commented 1 year ago

image Have this error can someone help me please?

vivinano commented 1 year ago

You might have the wrong token it seems like your failing the access to gateway hence everything is probably returning empty

KosakiAjami commented 1 year ago

Don't think so because I tried to connect to discord with the token and it works do u have discord please it will be more simple to communicate?

KosakiAjami commented 1 year ago

I tried to dl old release of mudaebot and all works fine but it doesn't react with the embed message so I don't know It set a reaction and that's all

Kaizuk-O commented 1 year ago

I'm having the same thing, old release works fine but doesn't react with embeds. On the new one, it gives the same error as above, even with my token being correct - I know the token is fine as it allows me to use it with an older release

vivinano commented 1 year ago

I’ll check it out Sent from my iPhoneOn May 21, 2023, at 3:34 PM, Kaizuk-O @.***> wrote: I'm having the same thing, old release works fine but doesn't react with embeds on the new one

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

Kaizuk-O commented 1 year ago

Let me know if you have an update, thanks!

Kaizuk-O commented 1 year ago

Did you find anything or do you need any details off me? 😅

vivinano commented 1 year ago

I've tested the bot on my account and it seems to be running fine

Are you guys obtaining the $settings option or no

ilyoni commented 1 year ago

It tries to obtain the $settings but when I do it, it cant find the settings even though it's there even after restarting the bot multiple times

vivinano commented 1 year ago

Is there a setting that you can show me cause it searches a specific term so can you screenshot it Sent from my iPhoneOn May 26, 2023, at 2:54 PM, ilyoni @.***> wrote: It tries to obtain the $settings but when I do it, it cant find the settings even though it's there even after restarting the bot multiple times

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

Kaizuk-O commented 1 year ago

Hi, so I just did a $settings in the server and cleared the channel data as well: Screenshot 2023-05-26 221214 Screenshot 2023-05-26 221305 Screenshot 2023-05-26 221447

I've attached my bot settings too - is there anything out of the ordinary? I'm assuming it's the same for ilyoni seeing as they've got the same error as mine?

ilyoni commented 1 year ago

Yeah, same problem except the settings file is there but it still can't read it and the other error listed

vivinano commented 1 year ago

Is it a hidden file or somethingSent from my iPhoneOn May 26, 2023, at 9:10 PM, ilyoni @.***> wrote: Yeah, same problem except the settings file is there but it still can't read it and the other error listed

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

ilyoni commented 1 year ago

No because it creates the file but after a restart it wont read it image [ image ]([]([](url)))

ilyoni commented 1 year ago

image

Kaizuk-O commented 1 year ago

Yep, just can't seem to figure out why it won't even create a channeldata file for me, just gives the error I've posted on the earlier comment - is there something missing from my bot settings file that is possibly causing this?

vivinano commented 1 year ago

If necessary you could just manually copy and paste the settings you must need the bold asterisks around the values And also with the setting file there is it showing the ?? As a file specific thing or is it just for show type thing like IDE intellsense markings Sent from my iPhoneOn May 27, 2023, at 6:34 AM, Kaizuk-O @.***> wrote: Yep, just can't seem to figure out why it won't even create a channeldata file for me, just gives the error I've posted on the earlier comment - is there something missing from my bot settings file that is possibly causing this?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

Kaizuk-O commented 1 year ago
{
   "token":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxF6Q",
   "channel_ids":[
      XXXXXXXXXXXXXXXX15
   ],
   "slash_ids":[

   ],
   "slash_guild_ids":[

   ],
   "claim_delay":1,
   "kak_delay":1,
   "use_emoji":"<:keqing_love:795077041761288214>",
   "roll_this":"ma",
   "rolling":"True",
   "slash_rolling":"False",
   "pkmrolling":"True",
   "series_list":[

   ],
   "namelist":[

   ],
   "emoji_list":[
      "kakera", 
      "kakeraR",
      "kakeraW",
      "kakeraL"
   ],
   "soulemoji_list":[
      "kakeraO",
      "kakeraR",
      "KakeraW",
      "KakeraL"
   ],
   "min_kak":300,
   "Last_True":"True",
   "last_claim_min": 61,
   "min_kak_last_min": 10
}

So above are my settings for the bot - what do you reckon needs to be changed? Also not sure what you mean by is it showing the ?? as a file specific thing?

vivinano commented 1 year ago

So you’re able to get a channeldata file ? Or not Sent from my iPhoneOn May 27, 2023, at 7:57 AM, Kaizuk-O @.***> wrote: { "token":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxF6Q", "channel_ids":[ XXXXXXXXXXXXXXXX15 ], "slash_ids":[

], "slash_guild_ids":[

], "claim_delay":1, "kak_delay":1, "use_emoji":"<:keqing_love:795077041761288214>", "roll_this":"ma", "rolling":"True", "slash_rolling":"False", "pkmrolling":"True", "series_list":[

], "namelist":[

], "emoji_list":[ "kakera", "kakeraR", "kakeraW", "kakeraL" ], "soulemoji_list":[ "kakeraO", "kakeraR", "KakeraW", "KakeraL" ], "min_kak":300, "Last_True":"True", "last_claim_min": 61, "min_kak_last_min": 10 }

So above are my settings for the bot - what do you reckon needs to be changed? Also not sure what you mean by is it showing the ?? as a file specific thing?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

Kaizuk-O commented 1 year ago

Nope, with those settings, when I run the bot, I'm not able to generate a channeldata file at all, it throws the error as soon as the bot starts and says list index out of range - just as shown in my earlier screenshot

vivinano commented 1 year ago

Alright try to copy paste the settings manually and rename it the channel Id number and remember to put the bold asterisk and see if it’s just the search function Cause I know if channel is marked nsfw the search function doesn’t work Sent from my iPhoneOn May 27, 2023, at 8:24 AM, Kaizuk-O @.***> wrote: Nope, with those settings, when I run the bot, I'm not able to generate a channeldata file at all, it throws the error as soon as the bot starts and says list index out of range - just as shown in my earlier screenshot

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

Kaizuk-O commented 1 year ago

Just tried that, made sure to use the bold asterisks and checked the channel is definitely not an NSFW one as well:

Exception ignored in thread started by: <bound method GatewayServer._response_loop of <discum.gateway.gateway.GatewayServer object at 0x0000021931F7C760>>
Traceback (most recent call last):
  File "C:\Users\XXXXX\AppData\Roaming\Python\Python39\site-packages\discum\gateway\gateway.py", line 299, in _response_loop
    func(resp)
  File "D:\XXXXX\XXXXXXXX\XXXXXXXX\XXXXXXXXXX\MudaeAutoBot.py", line 776, in on_message
    bot.gateway.request.searchSlashCommands(str(ghids[0]), limit=100, command_ids=[])
IndexError: list index out of range

Still getting the above

vivinano commented 1 year ago

That a different error actually I think you just need to put the correct ids into the slash id field since if your enabled slash commands that needs to be set in settings mudae Sent from my iPhoneOn May 27, 2023, at 10:22 AM, Kaizuk-O @.***> wrote: Just tried that, made sure to use the bold asterisks and checked the channel is definitely not an NSFW one as well: Exception ignored in thread started by: <bound method GatewayServer._response_loop of <discum.gateway.gateway.GatewayServer object at 0x0000021931F7C760>> Traceback (most recent call last): File "C:\Users\XXXXX\AppData\Roaming\Python\Python39\site-packages\discum\gateway\gateway.py", line 299, in _response_loop func(resp) File "D:\XXXXX\XXXXXXXX\XXXXXXXX\XXXXXXXXXX\MudaeAutoBot.py", line 776, in on_message bot.gateway.request.searchSlashCommands(str(ghids[0]), limit=100, command_ids=[]) IndexError: list index out of range

Still getting the above

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

Kaizuk-O commented 1 year ago

So I've tried that and now it reads the channeldata file, but this is the error now:


Reading from File for channel XXXXXXXXXXXXXXXX715
Exception ignored in thread started by: <bound method GatewayServer._response_loop of <discum.gateway.gateway.GatewayServer object at 0x000002216EA6F630>>
Traceback (most recent call last):
  File "C:\XXXXXXXXX\XXXXXXX\AppData\Roaming\Python\Python39\site-packages\discum\gateway\gateway.py", line 299, in _response_loop
    func(resp)
  File "D:\XXXXX\XXXXXXXX\XXXXX\XXXXXXXXXXXXXXXXXXXXXXXX\MudaeAutoBot.py", line 784, in on_message
    c_settings = parse_settings_message(msg)
  File "D:\XXXXX\XXXXXXXX\XXXXX\XXXXXXXXXXXXXXXXMudaeAutoBot.py", line 237, in parse_settings_message
    settings['claim_snipe'][0] = int(settings['claim_snipe'][0])
IndexError: list index out of range

any ideas?

Kaizuk-O commented 1 year ago

Also, it is now able to create a channeldata file from scratch too... progress! 😄

vivinano commented 1 year ago

alright now what is inside that file

Kaizuk-O commented 1 year ago

This is what's inside the channeldata file:


_ __**Server Settings**__ _
(Server not premium)

· Prefix: **$** ($prefix)
· Lang: **en** ($lang)
· Claim reset: every **180** min. ($setclaim)
· Exact minute of the reset: xx:**00** ($setinterval)
· Reset shifted: by +**0** min. ($shifthour)
· Rolls per hour: **8** ($setrolls)
· Time before the claim reaction expires: **45** sec. ($settimer)
· Spawn rarity multiplicator for already claimed characters: **4** ($setrare)
· Server game mode: **2** ($gamemode)
· $servlimroul = 7000 $wa, 7000 $ha, 4000 $wg, 4000 $hg
· This channel instance: **1** ($channelinstance)
· Slash commands: enabled ($toggleslash)

· Ranking: enabled ($toggleclaimrank/$togglelikerank)
· Ranks displayed during rolls: claims and likes ($togglerolls)
· Hentai series: enabled ($togglehentai)
· Disturbing imagery series: enabled ($toggledisturbing)
· Child characters: enabled ($togglechildtag)
· Rolls sniping: 0 ($togglesnipe)
· Kakera sniping: 0 ($togglekakerasnipe)
· Limit of characters per harem: **8100** ($haremlimit)
· Reacts: ****for all your rolls**** ($togglereact)
· Custom reactions: no ($claimreact)
· Kakera reactions more recognizable: no ($kakerareact switchset)

· Kakera trading: enabled ($togglekakeratrade)
· Kakera calculation: **like ranks only** (and number of claimed characters) ($togglekakeraclaim/$togglekakeralike)
· Kakera value displayed during rolls: enabled ($togglekakerarolls)
· $kakeraloot wishprotect: enabled ($togglewishprotect)
Kaizuk-O commented 1 year ago

Side note: I noticed the 4 asterisks around the 'for all your rolls' and removed two to make it bold - still gives the same error as before

Veirt commented 1 year ago

Hello @vivinano, I made a pull request regarding this issue. Can you review #241?

idontsmokegas commented 1 year ago

does anyone know how to fix this?, I'm having the same problem too

bycEEE commented 1 year ago

@idontsmokegas I put up #251 cause I'm running into the same thing.