Table of Contents

Class Guild

Namespace
NetCord.Gateway
Assembly
NetCord.dll

Represents an isolated collection of users and channels, often referred to as a server in the UI. Contains additional information about the guild's current state.

public class Guild : RestGuild, IEntity, ISpanFormattable, IFormattable, IEquatable<Entity>, IJsonModel<JsonGuild>, IComparer<PartialGuildUser>
Inheritance
Guild
Implements
Inherited Members

Constructors

Guild(JsonGuild, ulong, Guild)

public Guild(JsonGuild jsonModel, ulong clientId, Guild oldGuild)

Parameters

jsonModel JsonGuild
clientId ulong
oldGuild Guild

Guild(JsonGuild, ulong, RestClient)

public Guild(JsonGuild jsonModel, ulong clientId, RestClient client)

Parameters

jsonModel JsonGuild
clientId ulong
client RestClient

Properties

ActiveThreads

An array of GuildThread objects, representing all active threads in the Guild that current user has permission to view.

public ImmutableDictionary<ulong, GuildThread> ActiveThreads { get; set; }

Property Value

ImmutableDictionary<ulong, GuildThread>

Channels

A dictionary of IGuildChannel objects, representing channels present in the Guild.

public ImmutableDictionary<ulong, IGuildChannel> Channels { get; set; }

Property Value

ImmutableDictionary<ulong, IGuildChannel>

IsLarge

Whether the Guild's member count is over the large threshold.

public bool IsLarge { get; }

Property Value

bool

IsOwner

true if the user is the owner of the RestGuild.

public override bool IsOwner { get; }

Property Value

bool

IsUnavailable

Whether the Guild is unavailable due to an outage.

public bool IsUnavailable { get; }

Property Value

bool

JoinedAt

When the current user joined the Guild.

public DateTimeOffset JoinedAt { get; }

Property Value

DateTimeOffset

Presences

A dictionary of Presence objects, will only include offline users if IsLarge is true.

public ImmutableDictionary<ulong, Presence> Presences { get; set; }

Property Value

ImmutableDictionary<ulong, Presence>

ScheduledEvents

A dictionary of GuildScheduledEvent objects, representing currently scheduled events in the Guild.

public ImmutableDictionary<ulong, GuildScheduledEvent> ScheduledEvents { get; set; }

Property Value

ImmutableDictionary<ulong, GuildScheduledEvent>

StageInstances

A dictionary of StageInstance objects, representing active stage instances in the Guild.

public ImmutableDictionary<ulong, StageInstance> StageInstances { get; set; }

Property Value

ImmutableDictionary<ulong, StageInstance>

UserCount

The total number of GuildUsers in the Guild.

public int UserCount { get; }

Property Value

int

Users

A dictionary of GuildUser objects, representing users in the Guild.

public ImmutableDictionary<ulong, GuildUser> Users { get; set; }

Property Value

ImmutableDictionary<ulong, GuildUser>

VoiceStates

A dictionary of VoiceState objects, representing the states of GuildUsers currently in voice channels.

public ImmutableDictionary<ulong, VoiceState> VoiceStates { get; set; }

Property Value

ImmutableDictionary<ulong, VoiceState>

Methods

With(Action<Guild>)

public Guild With(Action<Guild> action)

Parameters

action Action<Guild>

Returns

Guild