pycord icon indicating copy to clipboard operation
pycord copied to clipboard

Reducing IDE annoyances when setting Intents

Open DefiDebauchery opened this issue 3 years ago • 2 comments

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

DefiDebauchery avatar Nov 04 '22 20:11 DefiDebauchery

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

Dorukyum avatar Nov 30 '23 07:11 Dorukyum

Sure. Still seems to be happening with master

Screenshot 2023-11-30 at 11 03 33 AM

DefiDebauchery avatar Nov 30 '23 16:11 DefiDebauchery