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>, ICloneable
Inheritance
Guild
Implements
Inherited Members

Constructors

Guild(JsonGuild, ulong, Guild, IDictionaryProvider)

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

Parameters

jsonModel JsonGuild
clientId ulong
oldGuild Guild
dictionaryProvider IDictionaryProvider

Guild(JsonGuild, ulong, RestClient, IDictionaryProvider)

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

Parameters

jsonModel JsonGuild
clientId ulong
client RestClient
dictionaryProvider IDictionaryProvider

Properties

ActiveThreads

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

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

Property Value

IReadOnlyDictionary<ulong, GuildThread>

Channels

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

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

Property Value

IReadOnlyDictionary<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 IReadOnlyDictionary<ulong, Presence> Presences { get; set; }

Property Value

IReadOnlyDictionary<ulong, Presence>

ScheduledEvents

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

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

Property Value

IReadOnlyDictionary<ulong, GuildScheduledEvent>

StageInstances

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

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

Property Value

IReadOnlyDictionary<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 IReadOnlyDictionary<ulong, GuildUser> Users { get; set; }

Property Value

IReadOnlyDictionary<ulong, GuildUser>

VoiceStates

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

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

Property Value

IReadOnlyDictionary<ulong, VoiceState>