Kr4ken-9 / DAB

Discord Automation Bot - A selfbot that automates other bots, including Pokecord (formerly) and now PokeTwo and PokeRealm.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Task exception was never retrieved

opened this issue · comments

Get this every time I try to use the selfbot:

PS C:\Users\Stardix\Desktop\DAB-master> python3.8.exe main.py

2020-03-22 21:29:30.868016: Message farming enabled
Task exception was never retrieved
future: <Task finished name='Task-1' coro=<Messages.farm() done, defined at C:\Users\Stardix\Desktop\DAB-master\src\messages\messages.py:14> exception=AttributeError("'NoneType' object has no attribute 'typing'")>
Traceback (most recent call last):
  File "C:\Users\Stardix\Desktop\DAB-master\src\messages\messages.py", line 48, in farm
    await outbound.send()
  File "C:\Users\Stardix\Desktop\DAB-master\src\outbound_message.py", line 12, in send
    async with self.channel.typing():
AttributeError: 'NoneType' object has no attribute 'typing'

2020-03-22 21:29:30.869019: Tatsumaki rep farming enabled
Task exception was never retrieved
future: <Task finished name='Task-2' coro=<Tatsumaki.rep() done, defined at C:\Users\Stardix\Desktop\DAB-master\src\tatsumaki\tatsumaki.py:15> exception=AttributeError("'NoneType' object has no attribute 'typing'")>
Traceback (most recent call last):
  File "C:\Users\Stardix\Desktop\DAB-master\src\tatsumaki\tatsumaki.py", line 42, in rep
    await outbound.send()
  File "C:\Users\Stardix\Desktop\DAB-master\src\outbound_message.py", line 12, in send
    async with self.channel.typing():
AttributeError: 'NoneType' object has no attribute 'typing'

Logged in as
[redacted]
123456789123456789
------

Configs related:

Messages.yaml

firsttime: false
enabled: true
randomchannels: false
channels: ['123456789123456789']
messages: [123456789123456789]
delay: 120
silent: false

Tatsumaki.yaml

firsttime: false
repfarming: true
channel: '123456789123456789'
recipients: ['123456789123456789']
delay: 1440
silent: 3

Shared.yaml

token: 123456789123456789
owners: ['123456789123456789']
logging: true
prefix: "%%"

What's the issue with my configs? I did not use the automatic configuration.

The issue is actually with my example configs, I apologize for that. The issue can be seen from this commit
4a69459

One of the first things you will see in that commit is me changing all ID-based things (e.g channel IDs, user IDs) from strings to integers.

In your configs, or rather the configs I forgot to update, the IDs are being stored as strings and need to be stored as integers.

Shared.yaml

token: 123456789123456789
owners: ['123456789123456789']
logging: true
prefix: "%%"

Will become:

token: 123456789123456789
owners: [123456789123456789]
logging: true
prefix: "%%"

Messages.yaml

firsttime: false
enabled: true
randomchannels: false
channels: ['123456789123456789']
messages: [123456789123456789]
delay: 120
silent: false

Fixed Messages.yaml

firsttime: false
enabled: true
randomchannels: false
channels: [123456789123456789]
messages: [123456789123456789]
delay: 120
silent: false

Tatsumaki.yaml

firsttime: false
repfarming: true
channel: '123456789123456789'
recipients: ['123456789123456789']
delay: 1440
silent: 3

Fixed Tatsumaki.yaml

firsttime: false
repfarming: true
channel: 123456789123456789
recipients: [123456789123456789]
delay: 1440
silent: 3

Thank you for bringing this to my attention. I am going to push an update soon fixing the example configs. Looking back, this has actually been an issue since November 2018 (e4763bf) when I updated discord.py. In the older versions, discord.py accepted IDs as strings.

I apologize for this error. I would have encountered this myself but I actually store my config files elsewhere (because they contain my token and other information) and so the example config files don't get tested.

Awesome! DAB works amazingly after these fixes. Thank you.

Happy to help!