Page cover

Clan Data

Representing a Steam Clan aka Steam Group

Like what your seeing?

Introduction

using HeathenEngineering.SteamworksIntegration;
public struct ClanData : IEquatable<CSteamID>, 
                         IEquatable<ClanData>, 
                         IEquatable<ulong>, 
                         IComparable<CSteamID>, 
                         IComparable<ClanData>, 
                         IComparable<ulong>

The clan structure is used by most of the features of the API.Clans interface. Its returned by GetClans and similar methods and is an input for most methods.

The Clan structure is interchangable with CSteamID and ulong

ClanData clan = new CSteamID(id);
CSteamID clanId = clan;
ulong clanIdValue = clan;
Clan clanCopy = clanIdValue;

Fields and Attributes

SteamId

The Steam API native CSteamID value for this

AccountId

The account ID segment of the full CSteamID, to understand more read this article.

FriendId

The underlying uint value of the AccountID_t segment of the CSteamID, to understand more read this article.

IsValid

This indicates rather or not the underlying CSteamID is of the proper Universe and Type it does not indicate that it is a valid entry. E.g. this tells you if the data is of the right shape ... not that it equates to a valid entry in Steam client.

Icon

Returns the loaded texture if any,

This will be null if you have not yet loaded this icon. Call the method LoadIcon to load the icon. Note you really shouldn't need to use this in most cases, simply calling LoadIcon is faster and safer. This is only really useful to see if the icon had already been loaded e.g. if this is null then no.

Name

Returns the display name of this clan localized to the local user if available.

Tag

Returns the clan tag for this clan

Owner

Returns the Steam user that owns this clan

Officers

Returns a collection of the officers of this clan if visible to the user.

Number Of Members In Chat

Returns the number of members in the chat, note for large chats Steam may not be able to fully iterate the members so for big clans consider this a 🤷‍♂️

Members In Chat

As much as Steam API is able to do so this will produce a collection of the user's in the chat.

Valve notes in its own documentation that very large clans cannot be iterated properly so this may be a partial or empty list.

Is Official Game Group

True if this clan is a game's official group / clan as opposed to being a user's clan / group. Note every game has an official "group" this is represented on Steam's backend as a "Clan" and includes chats, forums and other social network features.

Is Public

Is this clan a public clan or a private clan

Is User Owner

Is the local user the owner of this clan

Is User Officer

Is the local user an officer of this clan, note this iterates the officers, its generally better to do this your self such as

Methods

Get

A set of static method for fetching the ClanData object based on various forms of the ID or to get a list of all clans the user is a member of

Join Chat

The JoinChat method will attempt to join the user to clan's chat room. The resulting callback will return a ClanChatRoom object indicating the state, providing access to the chat and being of use in other chat related methods.

Load Icon

Loads the icon if not already loaded, returns the icon once loaded

Last updated