feat: cache voice channel info from gateway#3210
Open
Conversation
|
Thanks for opening this pull request! This pull request can be checked-out with: git fetch origin pull/3210/head:pr-3210
git checkout pr-3210This pull request can be installed with: pip install git+https://github.com/Pycord-Development/pycord@refs/pull/3210/head |
…o feat/channel-status-gateway # Conflicts: # discord/channel.py
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") |
…o feat/channel-status-gateway
Member
Author
|
Needs input: API for |
…o feat/channel-status-gateway
Paillat-dev
reviewed
Apr 22, 2026
Co-authored-by: Paillat <jeremiecotti@ik.me> Signed-off-by: plun1331 <plun1331@gmail.com>
plun1331
commented
May 2, 2026
Co-authored-by: plun1331 <plun1331@gmail.com> Signed-off-by: plun1331 <plun1331@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
cache_channel_info, defaultFalse)voice_channel_start_time_updateeventvoice_start_timeto voice channels.statusis stored on voice channels.Information
examples, ...).
Checklist
type: ignorecomments were used, a comment is also left explaining why.