dolfies / discord.py-self

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

`MessageType` for every message is `MessageType.default` #346

Closed NexWasTaken closed 2 years ago

NexWasTaken commented 2 years ago

Summary

MessageType for messages should be MessageType.reply and more but it's only MessageType.default

Reproduction Steps

Code

async def get_messages(channel: discord.TextChannel):
    messages: list[discord.Message] = await channel.history(limit=10000).flatten()
    # THIS SHOULD FILTER OUT REPLIES BUT IT DOESN'T SINCE THE REPLIES ALSO HAVE MESSAGETYPE.DEFAULT
    messages = [
        message for message in messages if message.type == discord.MessageType.default
    ]
    print(channel.name, len(messages))
    return messages

Expected Results

The type should've been MessageType.reply

Actual Results

The type was MessageType.default

System Information

Checklist

Additional Information

No response

JU5TDIE commented 2 years ago

You are using deprecated version of discord.py-self. It works well in alpha version.

dolfies commented 2 years ago

API v6 sends replies as regular messages. Use the alpha.