Table of Contents

Method IsInGuild

Namespace
DisCatSharp.Entities
Assembly
DisCatSharp.dll

IsInGuild(DiscordGuild)

Whether this user is in a DiscordGuild

public Task<bool> IsInGuild(DiscordGuild guild)

Parameters

guild DiscordGuild

DiscordGuild

Returns

Task<bool>

bool

Examples

DiscordGuild guild = await Client.GetGuildAsync(806675511555915806);
DiscordUser user = await Client.GetUserAsync(469957180968271873);
Console.WriteLine($"{user.Username} {(user.IsInGuild(guild) ? "is a" : "is not a")} member of {guild.Name}");

results to J_M_Lutra is a member of Project Nyaw~.