Closed AloW0304 closed 8 months ago
Also thanks so much for the consistent and constant support you are giving to this project, it is greatly appreciated. :)
The impact of this error causes this error message when running main.py File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/discord/client.py", line 600, in _run_event await coro(*args, **kwargs) File "/Users/Desktop/PokeGrinder-2.4/cogs/startup.py", line 51, in on_ready await get_commands(self.bot, self.config.hunting_channel_id) File "/Users/Desktop/PokeGrinder-2.4/cogs/startup.py", line 31, in get_commands for command in await channel.application_commands() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'TextChannel' object has no attribute 'application_commands'
Then the Pokegrinder logs and table pop up but nothing happens, eta time increases but no encounters or catches happen
After downloading the new update, I think I might've found an error, the document startup.py comes up with this error: Tuple expression not allowed in type annotation Use Tuple[T1, ..., Tn] to indicate a tuple type or Union[T1, T2] to indicate a union type which is talking about this command here: async def get_commands(bot: commands.Bot, channel_id: int) -> ( TextChannel, dict[str, SlashCommand | UserCommand | MessageCommand | SubCommand] | None, ):
with this line of code here: ( TextChannel, dict[str, SlashCommand | UserCommand | MessageCommand | SubCommand] | None, ): being broadcast as the problem
Remove this part of the code that is causing the error :-
-> ( TextChannel, dict[str, SlashCommand | UserCommand | MessageCommand | SubCommand] | None, )
And then try running again
After running, this comes up in the terminal. Nothing is spawned or caught, only the time keeps ticking. There is no more error message now.
After running, this comes up in the terminal. Nothing is spawned or caught, only the time keeps ticking. There is no more error message now.
Remove this line from modules/logging.py then look for errors os.system("cls" if os.name == "nt" else "clear")
After running, this comes up in the terminal. Nothing is spawned or caught, only the time keeps ticking. There is no more error message now.
I have updated the repository this must be fixed now.
getting this error now: Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/discord/client.py", line 600, in _run_event await coro(*args, **kwargs) File "/Users/Desktop/PokeGrinder-2.4/cogs/startup.py", line 48, in on_ready await get_commands(self.bot, self.config.hunting_channel_id) File "/Users/Desktop/PokeGrinder-2.4/cogs/startup.py", line 28, in get_commands for command in await channel.application_commands() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'TextChannel' object has no attribute 'application_commands'
which is the same error as before, however now my table looks like this:
getting this error now: Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/discord/client.py", line 600, in _run_event await coro(*args, **kwargs) File "/Users/Desktop/PokeGrinder-2.4/cogs/startup.py", line 48, in on_ready await get_commands(self.bot, self.config.hunting_channel_id) File "/Users/Desktop/PokeGrinder-2.4/cogs/startup.py", line 28, in get_commands for command in await channel.application_commands() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'TextChannel' object has no attribute 'application_commands'
which is the same error as before, however now my table looks like this:
Install git here Then run these commands and then try again:-
pip uninstall discord.py-self
git clone https://github.com/dolfies/discord.py-self
cd discord.py-self
python3 -m pip install -U .[voice]
each command works except the final command: python3 -m pip install -U .[voice] I get the error: zsh: no matches found: .[voice] Should I use a different shell that's not zsh?
Nevermind, fixed it. Once again, thank-you so much, it is greatly appreciated
Hello I am facing the same issue
Hello I am facing the same issue
Please check your channel ids in the config. Make sure you can access the channel that you put in the config.
Now I am getting this error.
Is this how ur supposed to put the channel ID in config? { "ClearConsole": false, "CaptchaSolver": true, "LoggingInterval": 10, "SuspicionAvoidance": 250, "abcdtoken": { "1088783924xxxxxxxx": 1, "10889183148xxxxxxxx": 0, "Balls": { "Common": "pb", "Uncommon": "pb", "Rare": "gb", "Super Rare": "ub", "Legendary": "mb", "Shiny": "mb", "Shiny Event": "mb", "Shiny Full-odds": "prb" },
Now I am getting this error.
Is this how ur supposed to put the channel ID in config? { "ClearConsole": false, "CaptchaSolver": true, "LoggingInterval": 10, "SuspicionAvoidance": 250, "abcdtoken": { "1088783924xxxxxxxx": 1, "10889183148xxxxxxxx": 0, "Balls": { "Common": "pb", "Uncommon": "pb", "Rare": "gb", "Super Rare": "ub", "Legendary": "mb", "Shiny": "mb", "Shiny Event": "mb", "Shiny Full-odds": "prb" },
no lol. this is how you put it:-
"HuntingChannel": 1088783924xxxxxxxx,
"FishingChannel": 10889183148xxxxxxxx,
Oh now it works thanks. But whenever it says "Please wait a few more seconds to find another Pokemon!" the bot stops working and I have to do /pokemon for it to start catching again
After downloading the new update, I think I might've found an error, the document startup.py comes up with this error: Tuple expression not allowed in type annotation Use Tuple[T1, ..., Tn] to indicate a tuple type or Union[T1, T2] to indicate a union type which is talking about this command here: async def get_commands(bot: commands.Bot, channel_id: int) -> ( TextChannel, dict[str, SlashCommand | UserCommand | MessageCommand | SubCommand] | None, ):
with this line of code here: ( TextChannel, dict[str, SlashCommand | UserCommand | MessageCommand | SubCommand] | None, ): being broadcast as the problem