pycord icon indicating copy to clipboard operation
pycord copied to clipboard

Reducing IDE annoyances when setting Intents

Open DefiDebauchery opened this issue 1 year 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