Pycord-Development / pycord

Pycord, a maintained fork of discord.py, is a python wrapper for the Discord API
https://docs.pycord.dev
MIT License
2.69k stars 459 forks source link

Reducing IDE annoyances when setting Intents #1759

Open DefiDebauchery opened 1 year ago

DefiDebauchery commented 1 year ago

Summary

Reworking Intents to remove readonly settings

What is the feature request for?

The core library

The Problem

When setting individual Intents, the preferred way is to directly set the class attribute:

intents = discord.Intents.default()
intents.members = True

Since Intents attributes are marked read-only, IDEs will complain. This can confuse new users, but it's also just slightly annoying in general.

The Ideal Solution

Unsure the most 'pythonic' way, but either Intents members should no longer read-only, or create setters (...or perhaps some update() method that allows passing in kwargs of the attributes)

The Current Solution

No response

Additional Context

No response

Dorukyum commented 7 months ago

Can't reproduce anymore, could you share an image after testing on master?

DefiDebauchery commented 7 months ago

Sure. Still seems to be happening with master

Screenshot 2023-11-30 at 11 03 33 AM