dolfies / discord.py-self

A fork of the popular discord.py for user accounts.
https://discordpy-self.rtfd.io/en/latest/
MIT License
688 stars 160 forks source link

fixes #616 #618

Closed pc111c closed 9 months ago

pc111c commented 10 months ago

Summary

Fixes #616

General Info

woctezuma commented 10 months ago

I can confirm this fixes #616 for me.

uniqueuser-repo commented 10 months ago

How can we install this version using pip?

idkrn123 commented 10 months ago

@uniqueuser-repo

How can we install this version using pip?

pip install git+https://github.com/pc111c/discord.py-self.git@patch-1

woctezuma commented 10 months ago

working very well image

Try again later. Nothing to do with the fix.

AkamePro commented 10 months ago

Me sigue saliendo este error:

Traceback (most recent call last): File "c:\Users\arnol\Desktop\Kakeras\main.py", line 74, in bot.run(config["token"], log_handler=handler) File "C:\Users\arnol\AppData\Local\Programs\Python\Python311\Lib\site-packages\selfcord\client.py", line 1059, in run asyncio.run(runner()) File "C:\Users\arnol\AppData\Local\Programs\Python\Python311\Lib\asyncio\runners.py", line 190, in run return runner.run(main) ^^^^^^^^^^^^^^^^ File "C:\Users\arnol\AppData\Local\Programs\Python\Python311\Lib\asyncio\runners.py", line 118, in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\arnol\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 653, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "C:\Users\arnol\AppData\Local\Programs\Python\Python311\Lib\site-packages\selfcord\client.py", line 1048, in runner await self.start(token, reconnect=reconnect) File "C:\Users\arnol\AppData\Local\Programs\Python\Python311\Lib\site-packages\selfcord\client.py", line 978, in start await self.login(token) File "C:\Users\arnol\AppData\Local\Programs\Python\Python311\Lib\site-packages\selfcord\client.py", line 820, in login data = await state.http.static_login(token.strip()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\arnol\AppData\Local\Programs\Python\Python311\Lib\site-packages\selfcord\http.py", line 1054, in static_login data = await self.get_me() ^^^^^^^^^^^^^^^^^^^ File "C:\Users\arnol\AppData\Local\Programs\Python\Python311\Lib\site-packages\selfcord\http.py", line 698, in request await self.startup() File "C:\Users\arnol\AppData\Local\Programs\Python\Python311\Lib\site-packages\selfcord\http.py", line 634, in startup self.super_properties, self.encoded_superproperties = sp, = await utils._get_info(session) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\arnol\AppData\Local\Programs\Python\Python311\Lib\site-packages\selfcord\utils.py", line 1451, in _get_info bn = await _get_build_number(session) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\arnol\AppData\Local\Programs\Python\Python311\Lib\site-packages\selfcord\utils.py", line 1480, in _get_build_number build_url = 'https://discord.com/assets/' + re.compile(r'assets/+([a-z0-9]+).js').findall(login_page)[-2] + '.js'


IndexError: list index out of range
Aurashk commented 10 months ago

fixes #616 for me, thanks.

God-damnit-all commented 9 months ago

try this as the regex (#626). All that for looping is not necessary.

r'assets/+([a-z0-9\.]+)\.js'

Works.

NaeCqde commented 9 months ago

try this as the regex (#626). All that for looping is not necessary.

r'assets/+([a-z0-9\.]+)\.js'

I'm sorry, but I sent you a comment after the conversation ended. I couldn't understand the intent of "/+" in your code, so I'll attach my best code below.

r'assets/([\w\.]+)\.js'

"\w" means adding "A-Z_" to "a-z0-9", but since ".js" is included in the regular expression, there is likely to be little risk of misjudgment. However, if you want to minimize the risk, we recommend using the code below.

r'assets/([a-z0-9\.]+)\.js'

Sorry if I'm wrong

TutlaMC commented 7 months ago

@dolfies For me I always have to use this version of discord.py-self because it doesn't work for me

mehh0vcki commented 7 months ago

@TutlaMC same!

God-damnit-all commented 7 months ago

@TutlaMC @mehh0vcki Are you installing from the latest commit of the repo? If not try pip install discord.py-self@git+https://github.com/dolfies/discord.py-self