if (_gatewayIntents.HasFlag(GatewayIntents.GuildPresences) &&
(_shardedClient is null && !_presenceUpdated.HasSubscribers ||
(_shardedClient is not null && !_shardedClient._presenceUpdated.HasSubscribers)))
{
await _gatewayLogger.WarningAsync("You're using the GuildPresences intent without listening to the PresenceUpdate event, consider removing the intent from your config.").ConfigureAwait(false);
((_shardedClient is null && _presenceUpdated.HasSubscribers) ||
(_shardedClient is not null && _shardedClient._presenceUpdated.HasSubscribers)))
{
await _gatewayLogger.WarningAsync("You're using the PresenceUpdate event without specifying the GuildPresences intent. Discord wont send this event to your client without the intent set in your config.").ConfigureAwait(false);
if (_gatewayIntents.HasFlag(GatewayIntents.GuildScheduledEvents) &&
((_shardedClient is null && !hasGuildScheduledEventsSubscribers) ||
(_shardedClient is not null && !shardedClientHasGuildScheduledEventsSubscribers)))
{
await _gatewayLogger.WarningAsync("You're using the GuildScheduledEvents gateway intent without listening to any events related to that intent, consider removing the intent from your config.").ConfigureAwait(false);
((_shardedClient is null && hasGuildScheduledEventsSubscribers) ||
(_shardedClient is not null && shardedClientHasGuildScheduledEventsSubscribers)))
{
await _gatewayLogger.WarningAsync("You're using events related to the GuildScheduledEvents gateway intent without specifying the intent. Discord wont send this event to your client without the intent set in your config.").ConfigureAwait(false);
}
@@ -779,12 +797,21 @@ namespace Discord.WebSocket
_inviteCreatedEvent.HasSubscribers ||
_inviteDeletedEvent.HasSubscribers;
if (_gatewayIntents.HasFlag(GatewayIntents.GuildInvites) && !hasInviteEventSubscribers)
if (_gatewayIntents.HasFlag(GatewayIntents.GuildInvites) &&
((_shardedClient is null && !hasInviteEventSubscribers) ||
(_shardedClient is not null && !shardedClientHasInviteEventSubscribers)))
{
await _gatewayLogger.WarningAsync("You're using the GuildInvites gateway intent without listening to any events related to that intent, consider removing the intent from your config.").ConfigureAwait(false);
}
if (!_gatewayIntents.HasFlag(GatewayIntents.GuildInvites) && hasInviteEventSubscribers)
if (!_gatewayIntents.HasFlag(GatewayIntents.GuildInvites) &&
((_shardedClient is null && hasInviteEventSubscribers) ||
(_shardedClient is not null && shardedClientHasInviteEventSubscribers)))
{
await _gatewayLogger.WarningAsync("You're using events related to the GuildInvites gateway intent without specifying the intent. Discord wont send this event to your client without the intent set in your config.").ConfigureAwait(false);
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.