dolfies / discord.py-self

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

channel.history returns error. #405

Closed serenity091 closed 1 year ago

serenity091 commented 1 year ago

Summary

channel.history returns error.

Reproduction Steps

This error only appears in git+https://github.com/dolfies/discord.py-self.git but not in the official discord.py-self library

Screen Shot 2022-10-24 at 11 04 04 AM Screen Shot 2022-10-24 at 11 04 50 AM

Code

No response

Expected Results

Channel.history is supposed to return messages in the channel.

Actual Results

Error.

System Information

pip install git+https://github.com/dolfies/discord.py-self.git

Checklist

Additional Information

No response

dolfies commented 1 year ago

.flatten() is removed, use [msg async for msg in channel.history(limit=1)] instead. This is noted in the migrating page on the docs.

serenity091 commented 1 year ago

still doesn't solve the issue. Have you tried running the code yourself? This works in the original discord.py-self

Screen Shot 2022-10-24 at 7 09 18 PM