MessengerTheGod / Discord-Dban

Mass Discord Message Delete Script
10 stars 6 forks source link

Issue when running dban #1

Open JohhnnyCash opened 5 years ago

JohhnnyCash commented 5 years ago

Ignoring exception in on_message Traceback (most recent call last): File "C:\Users\mypc\AppData\Local\Programs\Python\Python37\lib\site-packages\discord\client.py", line 255, in _run_event await coro(*args, **kwargs) File "C:\Users\mypc\Desktop\dban.py", line 38, in on_message async for msg in client.logs_from(message.channel,limit=9999): AttributeError: 'Client' object has no attribute 'logs_from'

kdog101 commented 5 years ago

The issue has to do with discord.py and their new migration to version 1.0.1 which breaks this script

You could remake this script but even I couldn’t figure it out, more information is here.

https://discordpy.readthedocs.io/en/latest/migrating.html

Or you can simply uninstall discord.py and use the older 1.0.0 version here https://github.com/Rapptz/discord.py/releases/tag/v1.0.0

Simply extract the folder, cd to the folder and type python3 pip uninstall discord.py then type python3.5 setup.py install Change the line in the script where it says client.server to client.guilds and it will print out the names of the servers you are in and it will work Note at the moment this only works on windows with python 3.5.4 I have tried replicating this “fix” on arch Linux and it still produces the same issues