Skip to content

feat: cache voice channel info from gateway#3210

Open
plun1331 wants to merge 18 commits intomasterfrom
feat/channel-status-gateway
Open

feat: cache voice channel info from gateway#3210
plun1331 wants to merge 18 commits intomasterfrom
feat/channel-status-gateway

Conversation

@plun1331
Copy link
Copy Markdown
Member

@plun1331 plun1331 commented Apr 20, 2026

Caution

Feature freeze is active, as described by our Release Schedule.

Summary

https://docs.discord.com/developers/change-log#voice-channel-status-and-start-time-documentation

  • Adds support for Request Channel Info
  • Adds a flag to Client to automatically request and cache channel info at startup (cache_channel_info, default False)
  • Adds voice_channel_start_time_update event
  • Adds voice_start_time to voice channels.
  • Reworks how status is stored on voice channels.

Information

  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed).
  • This PR is not a code change (e.g. documentation, README, typehinting,
    examples, ...).

Checklist

  • I have searched the open pull requests for duplicates.
  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • If type: ignore comments were used, a comment is also left explaining why.
  • I have updated the changelog to include these changes.
  • AI Usage has been disclosed.
    • If AI has been used, I understand fully what the code does

@pycord-app
Copy link
Copy Markdown

pycord-app Bot commented Apr 20, 2026

Thanks for opening this pull request!
Please make sure you have read the Contributing Guidelines and Code of Conduct.

This pull request can be checked-out with:

git fetch origin pull/3210/head:pr-3210
git checkout pr-3210

This pull request can be installed with:

pip install git+https://github.com/Pycord-Development/pycord@refs/pull/3210/head

@plun1331 plun1331 marked this pull request as ready for review April 20, 2026 23:22
@plun1331 plun1331 requested review from a team, Lumabots and Paillat-dev April 20, 2026 23:22
@plun1331 plun1331 requested a review from a team as a code owner April 20, 2026 23:22
@plun1331 plun1331 requested review from Icebluewolf and Soheab April 20, 2026 23:22
@plun1331
Copy link
Copy Markdown
Member Author

Test code I've been using:

import asyncio

import discord
import logging

logging.basicConfig(level=logging.DEBUG)

client = discord.Client(cache_channel_info=True, intents=discord.Intents.all(), chunk_guilds_at_startup=False)


@client.event
async def on_ready():
    while True:
        for channel in client.get_all_channels():
            if hasattr(channel, "voice_start_time") and channel.voice_start_time:
                print("rec", getattr(channel, "status", ...), channel.voice_start_time)


@client.event
async def on_voice_channel_status_update(channel, old, new):
    print("status", channel.status, channel.voice_start_time, old, new)


@client.event
async def on_voice_channel_start_time_update(channel, old, new):
    print("start", channel.status, channel.voice_start_time, old, new)


client.run("token")

@plun1331
Copy link
Copy Markdown
Member Author

Needs input: API for ChannelInfo and Guild.channel_info()

@plun1331 plun1331 added the feature Implements a feature label Apr 20, 2026
@Paillat-dev Paillat-dev self-assigned this Apr 22, 2026
Comment thread discord/client.py Outdated
Comment thread discord/guild.py Outdated
Comment thread discord/guild.py Outdated
Comment thread discord/raw_models.py
Comment thread discord/state.py Outdated
@Paillat-dev Paillat-dev requested review from a team and JustaSqu1d April 22, 2026 14:00
Co-authored-by: Paillat <jeremiecotti@ik.me>
Signed-off-by: plun1331 <plun1331@gmail.com>
Comment thread discord/guild.py Outdated
Comment thread discord/guild.py Outdated
Comment thread discord/state.py Outdated
plun1331 and others added 3 commits May 2, 2026 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants