Skip to content

Conversation

@VincentRPS
Copy link

definitely doesn't work yet

definitely doesn't work yet, just felt like there was way too much changes not to commit already
@VincentRPS VincentRPS requested a review from Paillat-dev May 15, 2025 19:54
Copy link
Member

@Paillat-dev Paillat-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't try running the code yet, will do that later today

Co-authored-by: Paillat <jeremiecotti@ik.me>
Signed-off-by: VincentRPS <vincentbusiness55@gmail.com>
@Paillat-dev
Copy link
Member

@VincentRPS You should also import defaultdict

@Paillat-dev
Copy link
Member

Any news ? See traceback of another error here:

https://canary.discord.com/channels/881207955029110855/881735314987708456/1373639761696133160

@Paillat-dev
Copy link
Member

Congrats @VincentRPS you successfully broke the docs ! 🎉

VincentRPS and others added 3 commits June 28, 2025 22:10
Co-authored-by: Paillat <jeremiecotti@ik.me>
Signed-off-by: VincentRPS <vincentbusiness55@gmail.com>
@Paillat-dev
Copy link
Member

Paillat-dev commented Jul 29, 2025

@VincentRPS I am going to rebase this for you and push here

@VincentRPS
Copy link
Author

@VincentRPS I am going to rebase this for you and push here

M'kay!

@Paillat-dev Paillat-dev changed the title refactor: ConnectionState & Event Handling refactor!: ConnectionState & Event Handling Sep 5, 2025
@Paillat-dev Paillat-dev linked an issue Sep 8, 2025 that may be closed by this pull request
)
return

member = await guild.get_member(int(data["user"]["id"]))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Normally people aren't members of guilds that they're being unbanned from

Copy link

@EmmmaTech EmmmaTech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:3

return await self.cache.get_all_stickers()

async def get_emoji(self, emoji_id: int | None) -> GuildEmoji | AppEmoji | None:
return await self.get_emoji(emoji_id)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return await self.get_emoji(emoji_id)
return await self.cache.get_emoji(emoji_id)

await state.maybe_store_app_emoji(state.application_id, e)


class GuildCreate(Event, Guild):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this (among a few other events) appears to be duplicated in guild.py?

else:
self.dispatch("guild_join", guild)

def parse_guild_audit_log_entry_create(self, data) -> None:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume these leftover parse functions have yet to be converted into events?

@Lumabots
Copy link

@VincentRPS are you still working on this ?

@Lumabots Lumabots closed this Oct 24, 2025
@Lumabots Lumabots reopened this Oct 24, 2025
@read-the-docs-community
Copy link

read-the-docs-community bot commented Nov 2, 2025

Documentation build overview

📚 pycord-next | 🛠️ Build #30169801 | 📁 Comparing c20b6f5 against latest (0a619ff)


🔍 Preview build

Show files changed (57 files in total): 📝 57 modified | ➕ 0 added | ➖ 0 deleted
File Status
faq.html 📝 modified
genindex.html 📝 modified
intents.html 📝 modified
migrating_to_v1.html 📝 modified
old_changelog.html 📝 modified
api/abcs.html 📝 modified
api/application_commands.html 📝 modified
api/application_info.html 📝 modified
api/audit_logs.html 📝 modified
api/clients.html 📝 modified
api/data_classes.html 📝 modified
api/enums.html 📝 modified
api/events.html 📝 modified
api/models.html 📝 modified
api/ui_kit.html 📝 modified
api/webhooks.html 📝 modified
_modules/discord/abc.html 📝 modified
_modules/discord/appinfo.html 📝 modified
_modules/discord/audit_logs.html 📝 modified
_modules/discord/automod.html 📝 modified
_modules/discord/channel.html 📝 modified
_modules/discord/client.html 📝 modified
_modules/discord/emoji.html 📝 modified
_modules/discord/enums.html 📝 modified
_modules/discord/flags.html 📝 modified
_modules/discord/guild.html 📝 modified
_modules/discord/interactions.html 📝 modified
_modules/discord/invite.html 📝 modified
_modules/discord/member.html 📝 modified
_modules/discord/message.html 📝 modified
_modules/discord/monetization.html 📝 modified
_modules/discord/onboarding.html 📝 modified
_modules/discord/partial_emoji.html 📝 modified
_modules/discord/poll.html 📝 modified
_modules/discord/raw_models.html 📝 modified
_modules/discord/role.html 📝 modified
_modules/discord/scheduled_events.html 📝 modified
_modules/discord/shard.html 📝 modified
_modules/discord/stage_instance.html 📝 modified
_modules/discord/sticker.html 📝 modified
_modules/discord/team.html 📝 modified
_modules/discord/template.html 📝 modified
_modules/discord/threads.html 📝 modified
_modules/discord/user.html 📝 modified
_modules/discord/voice_client.html 📝 modified
_modules/discord/welcome_screen.html 📝 modified
_modules/discord/widget.html 📝 modified
ext/commands/api.html 📝 modified
ext/pages/index.html 📝 modified
_modules/discord/commands/context.html 📝 modified
_modules/discord/commands/core.html 📝 modified
_modules/discord/ui/modal.html 📝 modified
_modules/discord/ui/select.html 📝 modified
_modules/discord/ui/view.html 📝 modified
modules/discord/webhook/async.html 📝 modified
_modules/discord/ext/commands/context.html 📝 modified
_modules/discord/ext/commands/converter.html 📝 modified

Migrate 18 remaining parse_x methods from ConnectionState to new Event subclasses following the established event migration pattern.

Created event files:
- audit_log.py: GuildAuditLogEntryCreate
- scheduled_event.py: GuildScheduledEvent{Create,Update,Delete,UserAdd,UserRemove}
- integration.py: GuildIntegrationsUpdate, Integration{Create,Update,Delete}
- stage_instance.py: StageInstance{Create,Update,Delete}
- voice.py: VoiceStateUpdate, VoiceServerUpdate, VoiceChannelStatusUpdate
- typing.py: TypingStart
- webhook.py: WebhooksUpdate

Changes to ConnectionState:
- Removed 18 parse_x methods
- Removed _get_typing_user helper (moved to typing.py)
- Cleaned up unused imports (AuditLogEntry, ScheduledEventStatus, _integration_factory, ScheduledEvent, StageInstance)
- Kept parse_guild_members_chunk (internal infrastructure)

Bug fixes:
- Fixed subscriber count decrement in GuildScheduledEventUserRemove

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rewrite a better caching system

7 participants