Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Random stop and throws this error #5

Open
MoZyo opened this issue Nov 28, 2021 · 3 comments
Open

Random stop and throws this error #5

MoZyo opened this issue Nov 28, 2021 · 3 comments

Comments

@MoZyo
Copy link

MoZyo commented Nov 28, 2021

Running via discord_auto_typer[updated].py

Randomly stops and throws this. Encountered this a few times now.

Traceback (most recent call last):
  File "D:\Name\dank-memer-button-update-autotyper-main\discord_auto_typer[updated].py", line 189, in hl_response
    hint_message = response_dict[0]["embeds"][0]["description"]
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Name\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1009, in _bootstrap_inner
    self.run()
  File "C:\Users\Name\AppData\Local\Programs\Python\Python310\lib\threading.py", line 946, in run
    self._target(*self._args, **self._kwargs)
  File "D:\Name\dank-memer-button-update-autotyper-main\discord_auto_typer[updated].py", line 246, in main
    reply_to_dank_memer(command) #sleep in this function, get the reply first
  File "D:\Name\dank-memer-button-update-autotyper-main\discord_auto_typer[updated].py", line 88, in reply_to_dank_memer
    hl_response(response_dict)
  File "D:\Name\dank-memer-button-update-autotyper-main\discord_auto_typer[updated].py", line 201, in hl_response
    trivia_response(response_dict[1:])
NameError: name 'trivia_response' is not defined. Did you mean: 'crime_response'?
@wowthecoder
Copy link
Owner

I think I forgot to edit the function name when I copy pasted that section of the code. Just updated the autotyper py file, let me know if you still get any errors.

@MoZyo
Copy link
Author

MoZyo commented Nov 29, 2021

I was able to fix it. I lowered the hl and trivia cooldown time in commands because I had patron status, adjusted it to default time and it's okay now.

I also noticed that even when I set 'pls buy life = 1800s", it still executes it within the loop, maybe around 30-60s I think.

Is there a way to set a timer for specific commands?

EDIT: The error is still happening. I just added the buy life from default commands.
Will try out your updated one.

@MoZyo
Copy link
Author

MoZyo commented Nov 30, 2021

Fixed except for the other issue I mentioned regarding the command timer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants