ADsecu / discord-infoserver

analysis servers , search for permissions and who has permissions. disocrd.py
6 stars 2 forks source link

"TypeError: can only concatenate str (not "int") to str" and "AttributeError: 'Client' object has no attribute 'servers'" #1

Open jerbear2008 opened 3 years ago

jerbear2008 commented 3 years ago

Whenever I run the script bot or user account, I get this response:

 ___ _   _ _____ ___
|_ _| \ | |  ___/ _ \ ___  ___ _ ____   _____ _ __
 | ||  \| | |_ | | | / __|/ _ \ '__\ \ / / _ \ '__|
 | || |\  |  _|| |_| \__ \  __/ |   \ V /  __/ |
|___|_| \_|_|   \___/|___/\___|_|    \_/ \___|_| v0.0.2
#=====================================================#
#                  Twitter: @ADsecu                   #
#=====================================================#

---------------------
I  AM  ONLINE [SelfBot]
MY  NAME  IS:   XXXXX
Ignoring exception in on_ready
Traceback (most recent call last):
  File "/home/jerbear/.local/lib/python3.8/site-packages/discord/client.py", line 343, in _run_event
    await coro(*args, **kwargs)
  File "self_infoserver.py", line 55, in on_ready
    print("MY  ID  IS: "+ bot.user.id)
TypeError: can only concatenate str (not "int") to str

I commented the offending line out and got the response:

 ___ _   _ _____ ___
|_ _| \ | |  ___/ _ \ ___  ___ _ ____   _____ _ __
 | ||  \| | |_ | | | / __|/ _ \ '__\ \ / / _ \ '__|
 | || |\  |  _|| |_| \__ \  __/ |   \ V /  __/ |
|___|_| \_|_|   \___/|___/\___|_|    \_/ \___|_| v0.0.2
#=====================================================#
#                  Twitter: @ADsecu                   #
#=====================================================#

---------------------
I  AM  ONLINE [SelfBot]
MY  NAME  IS:   XXXXX
---------------------

 Choose :
  [1]  Analysis All servers You have.
  [2]  Analysis server by ID.
  [3]  List all server You have
  [0]  Exit
  [00] Clear screen ;)

INFOserver~$ 1
WORKING ...
Ignoring exception in on_ready
Traceback (most recent call last):
  File "/home/jerbear/.local/lib/python3.8/site-packages/discord/client.py", line 343, in _run_event
    await coro(*args, **kwargs)
  File "self_infoserver.py", line 63, in on_ready
    for server in bot.servers:
AttributeError: 'Client' object has no attribute 'servers'

OR

 ___ _   _ _____ ___
|_ _| \ | |  ___/ _ \ ___  ___ _ ____   _____ _ __
 | ||  \| | |_ | | | / __|/ _ \ '__\ \ / / _ \ '__|
 | || |\  |  _|| |_| \__ \  __/ |   \ V /  __/ |
|___|_| \_|_|   \___/|___/\___|_|    \_/ \___|_| v0.0.2
#=====================================================#
#                  Twitter: @ADsecu                   #
#=====================================================#

---------------------
I  AM  ONLINE [SelfBot]
MY  NAME  IS:   XXXXX
---------------------

 Choose :
  [1]  Analysis All servers You have.
  [2]  Analysis server by ID.
  [3]  List all server You have
  [0]  Exit
  [00] Clear screen ;)

INFOserver~$ 2
Type or Paste server ID $~ XXXXXXXXXXX
Ignoring exception in on_ready
Traceback (most recent call last):
  File "/home/jerbear/.local/lib/python3.8/site-packages/discord/client.py", line 343, in _run_event
    await coro(*args, **kwargs)
  File "self_infoserver.py", line 72, in on_ready
    server = discord.utils.get(bot.servers, id=serverid)
AttributeError: 'Client' object has no attribute 'servers'

OR

 ___ _   _ _____ ___
|_ _| \ | |  ___/ _ \ ___  ___ _ ____   _____ _ __
 | ||  \| | |_ | | | / __|/ _ \ '__\ \ / / _ \ '__|
 | || |\  |  _|| |_| \__ \  __/ |   \ V /  __/ |
|___|_| \_|_|   \___/|___/\___|_|    \_/ \___|_| v0.0.2
#=====================================================#
#                  Twitter: @ADsecu                   #
#=====================================================#

---------------------
I  AM  ONLINE [SelfBot]
MY  NAME  IS:   XXXXX
---------------------

 Choose :
  [1]  Analysis All servers You have.
  [2]  Analysis server by ID.
  [3]  List all server You have
  [0]  Exit
  [00] Clear screen ;)

INFOserver~$ 3
Ignoring exception in on_ready
Traceback (most recent call last):
  File "/home/jerbear/.local/lib/python3.8/site-packages/discord/client.py", line 343, in _run_event
    await coro(*args, **kwargs)
  File "self_infoserver.py", line 83, in on_ready
    for server in bot.servers:
AttributeError: 'Client' object has no attribute 'servers'

(I have tried all this with the bot script as well.)

jerbear2008 commented 3 years ago

I am using an Ubuntu 20.4 WSL subsystem on Windows 10. I will try this outside of WSL soon.

jerbear2008 commented 3 years ago

Same exact problem on Windows 10 itself.

jerbear2008 commented 3 years ago

Hm, on Windows, I had multiple installations of python, including one from the Windows store. I will uninstall all of them and install the latest from the website.

jerbear2008 commented 3 years ago

No luck. This appears to be a problem with @ADsecu 's code. Has anyone else had any success with this? This is a bummer since there is no other tool that just tells you who has admin etc.

ADsecu commented 3 years ago

Hi jerbear2008 . Sorry . This tool since 2019 and need edit, discord api updated recently.

jerbear2008 commented 3 years ago

Will it be updated?