Search Results for

    Show / Hide Table of Contents

    Class KuracordGuild

    Inheritance
    Object
    SnowflakeObject
    KuracordGuild
    Implements
    IEquatable<KuracordGuild>
    Inherited Members
    SnowflakeObject.Id
    SnowflakeObject.CreationTimestamp
    Object.Equals(Object, Object)
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Namespace: KSharpPlus.Entities.Guild
    Assembly: KSharpPlus.dll
    Syntax
    public class KuracordGuild : SnowflakeObject

    Properties

    | Improve this Doc View Source

    Channels

    Gets a dictionary of all the channels associated with this guild. The dictionary's key is the channel ID.

    Declaration
    public IReadOnlyDictionary<ulong, KuracordChannel> Channels { get; }
    Property Value
    Type Description
    IReadOnlyDictionary<UInt64, KuracordChannel>
    | Improve this Doc View Source

    Description

    Gets the guild's description.

    Declaration
    public string Description { get; }
    Property Value
    Type Description
    String
    | Improve this Doc View Source

    Disabled

    Gets whether the guild is disabled.

    Declaration
    public bool Disabled { get; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    IconHash

    Gets the guild icon's hash.

    Declaration
    public string IconHash { get; }
    Property Value
    Type Description
    String
    | Improve this Doc View Source

    IconUrl

    Gets the guild icon's url.

    Declaration
    public string IconUrl { get; }
    Property Value
    Type Description
    String
    | Improve this Doc View Source

    Members

    Gets a dictionary of all the members that belong to this guild. The dictionary's key is the member ID.

    Declaration
    public IReadOnlyDictionary<ulong, KuracordMember> Members { get; }
    Property Value
    Type Description
    IReadOnlyDictionary<UInt64, KuracordMember>
    | Improve this Doc View Source

    Name

    Gets the guild's name.

    Declaration
    public string Name { get; }
    Property Value
    Type Description
    String
    | Improve this Doc View Source

    Owner

    Gets the guild's owner.

    Declaration
    public KuracordUser Owner { get; }
    Property Value
    Type Description
    KuracordUser
    | Improve this Doc View Source

    OwnerId

    Gets the ID of the guild's owner.

    Declaration
    public ulong OwnerId { get; }
    Property Value
    Type Description
    UInt64
    | Improve this Doc View Source

    Roles

    Gets a dictionary of all the roles associated with this guild. The dictionary's key is the role ID.

    Declaration
    public IReadOnlyDictionary<ulong, KuracordRole> Roles { get; }
    Property Value
    Type Description
    IReadOnlyDictionary<UInt64, KuracordRole>
    | Improve this Doc View Source

    ShortName

    Gets the guild's short name.

    Declaration
    public string ShortName { get; }
    Property Value
    Type Description
    String
    | Improve this Doc View Source

    VanityCode

    Gets the guild's vanity invite code.

    Declaration
    public string VanityCode { get; }
    Property Value
    Type Description
    String

    Methods

    | Improve this Doc View Source

    CreateChannelAsync(String, ChannelType)

    Creates a new channel in this guild.

    Declaration
    public Task<KuracordChannel> CreateChannelAsync(string name, ChannelType type)
    Parameters
    Type Name Description
    String name

    Name of the new channel.

    ChannelType type

    Type of the new channel.

    Returns
    Type Description
    Task<KuracordChannel>

    The newly-created channel.

    Exceptions
    Type Condition
    UnauthorizedException

    Thrown when the client does not have the Administrator permission.

    NotFoundException

    Thrown when the guild does not exist.

    BadRequestException

    Thrown when an invalid parameter was provided.

    ServerErrorException

    Thrown when Kuracord is unable to process the request.

    | Improve this Doc View Source

    CreateTextChannelAsync(String)

    Creates a new text channel in this guild.

    Declaration
    public Task<KuracordChannel> CreateTextChannelAsync(string name)
    Parameters
    Type Name Description
    String name

    Name of the new channel.

    Returns
    Type Description
    Task<KuracordChannel>

    The newly-created channel.

    Exceptions
    Type Condition
    UnauthorizedException

    Thrown when the client does not have the Administrator permission.

    NotFoundException

    Thrown when the guild does not exist.

    BadRequestException

    Thrown when an invalid parameter was provided.

    ServerErrorException

    Thrown when Kuracord is unable to process the request.

    | Improve this Doc View Source

    DeleteAsync(String)

    Deletes this guild. Requires the caller to be the owner of the guild.

    Declaration
    public Task DeleteAsync(string password)
    Parameters
    Type Name Description
    String password

    Your account password.

    Returns
    Type Description
    Task
    Exceptions
    Type Condition
    UnauthorizedException

    Thrown when the client is not the owner of the guild.

    ServerErrorException

    Thrown when Kuracord is unable to process the request.

    | Improve this Doc View Source

    Equals(KuracordGuild)

    Checks whether this KuracordGuild is equal to another KuracordGuild.

    Declaration
    public bool Equals(KuracordGuild e)
    Parameters
    Type Name Description
    KuracordGuild e

    KuracordGuild to compare to.

    Returns
    Type Description
    Boolean

    Whether the KuracordGuild is equal to this KuracordGuild.

    | Improve this Doc View Source

    Equals(Object)

    Checks whether this KuracordGuild is equal to another object.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj

    Object to compare to.

    Returns
    Type Description
    Boolean

    Whether the object is equal to this KuracordGuild.

    Overrides
    Object.Equals(Object)
    | Improve this Doc View Source

    GetChannelAsync(UInt64)

    Gets a channel from this guild by its ID.

    Declaration
    public async Task<KuracordChannel> GetChannelAsync(ulong channelId)
    Parameters
    Type Name Description
    UInt64 channelId

    ID of the channel to get.

    Returns
    Type Description
    Task<KuracordChannel>

    Requested channel.

    Exceptions
    Type Condition
    ServerErrorException

    Thrown when Kuracord is unable to process the request.

    | Improve this Doc View Source

    GetChannelsAsync()

    Gets all the channels this guild has.

    Declaration
    public Task<IReadOnlyList<KuracordChannel>> GetChannelsAsync()
    Returns
    Type Description
    Task<IReadOnlyList<KuracordChannel>>

    A collection of this guild's channels.

    Exceptions
    Type Condition
    ServerErrorException

    Thrown when Kuracord is unable to process the request.

    | Improve this Doc View Source

    GetHashCode()

    Gets the hash code for this KuracordGuild.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32

    The hash code for this KuracordGuild.

    Overrides
    Object.GetHashCode()
    | Improve this Doc View Source

    GetIconUrl()

    Gets guild's icon URL.

    Declaration
    public string GetIconUrl()
    Returns
    Type Description
    String

    The URL of the guild's icon.

    | Improve this Doc View Source

    GetMemberAsync(UInt64)

    Gets a member of this guild by their ID.

    Declaration
    public async Task<KuracordMember> GetMemberAsync(ulong memberId)
    Parameters
    Type Name Description
    UInt64 memberId

    ID of the member to get.

    Returns
    Type Description
    Task<KuracordMember>

    The requested member.

    Exceptions
    Type Condition
    ServerErrorException

    Thrown when Kuracord is unable to process the request.

    | Improve this Doc View Source

    GetMembersAsync()

    Retrieves a full list of members from Kuracord. This method will bypass cache.

    Declaration
    public async Task<IReadOnlyList<KuracordMember>> GetMembersAsync()
    Returns
    Type Description
    Task<IReadOnlyList<KuracordMember>>

    A collection of all members in this guild.

    Exceptions
    Type Condition
    ServerErrorException

    Thrown when Kuracord is unable to process the request.

    | Improve this Doc View Source

    GetRole(UInt64)

    Gets a role from this guild by its ID.

    Declaration
    public KuracordRole GetRole(ulong roleId)
    Parameters
    Type Name Description
    UInt64 roleId

    ID of the role to get.

    Returns
    Type Description
    KuracordRole

    Requested role or null if the role does not exists.

    | Improve this Doc View Source

    LeaveAsync()

    Leaves this guild.

    Declaration
    public Task LeaveAsync()
    Returns
    Type Description
    Task
    Exceptions
    Type Condition
    ServerErrorException

    Thrown when Kuracord is unable to process the request.

    | Improve this Doc View Source

    ModifyAsync(String)

    Modifies this guild.

    Declaration
    public Task<KuracordGuild> ModifyAsync(string name)
    Parameters
    Type Name Description
    String name

    New guild name.

    Returns
    Type Description
    Task<KuracordGuild>

    The modified guild object.

    Exceptions
    Type Condition
    UnauthorizedException

    Thrown when the client does not have the Administrator permission.

    NotFoundException

    Thrown when the guild does not exist.

    BadRequestException

    Thrown when an invalid parameter was provided.

    ServerErrorException

    Thrown when Kuracord is unable to process the request.

    | Improve this Doc View Source

    ModifyMemberAsync(KuracordMember, String)

    Modifies the member.

    Declaration
    public Task<KuracordMember> ModifyMemberAsync(KuracordMember member, string nickname)
    Parameters
    Type Name Description
    KuracordMember member

    Member to modify.

    String nickname

    New member nickname.

    Returns
    Type Description
    Task<KuracordMember>

    Modified member.

    Exceptions
    Type Condition
    UnauthorizedException

    Thrown when the client does not have the Administrator permission.

    NotFoundException

    Thrown when the member does not exist.

    BadRequestException

    Thrown when an invalid parameter was provided.

    ServerErrorException

    Thrown when Kuracord is unable to process the request.

    | Improve this Doc View Source

    ModifyMemberAsync(UInt64, String)

    Modifies the member.

    Declaration
    public Task<KuracordMember> ModifyMemberAsync(ulong memberId, string nickname)
    Parameters
    Type Name Description
    UInt64 memberId

    ID of the member to modify.

    String nickname

    New member nickname.

    Returns
    Type Description
    Task<KuracordMember>

    Modified member.

    Exceptions
    Type Condition
    UnauthorizedException

    Thrown when the client does not have the Administrator permission.

    NotFoundException

    Thrown when the member does not exist.

    BadRequestException

    Thrown when an invalid parameter was provided.

    ServerErrorException

    Thrown when Kuracord is unable to process the request.

    | Improve this Doc View Source

    RemoveMemberAsync(KuracordMember)

    Kicks the member from this guild.

    Declaration
    public Task RemoveMemberAsync(KuracordMember member)
    Parameters
    Type Name Description
    KuracordMember member

    The member to kick.

    Returns
    Type Description
    Task
    Exceptions
    Type Condition
    UnauthorizedException

    Thrown when the client does not have the KickMembers permission.

    NotFoundException

    Thrown when the member does not exist.

    BadRequestException

    Thrown when an invalid parameter was provided.

    ServerErrorException

    Thrown when Kuracord is unable to process the request.

    | Improve this Doc View Source

    RemoveMemberAsync(UInt64)

    Kicks the member from this guild.

    Declaration
    public Task RemoveMemberAsync(ulong memberId)
    Parameters
    Type Name Description
    UInt64 memberId

    ID of the member to kick.

    Returns
    Type Description
    Task
    Exceptions
    Type Condition
    UnauthorizedException

    Thrown when the client does not have the KickMembers permission.

    NotFoundException

    Thrown when the member does not exist.

    BadRequestException

    Thrown when an invalid parameter was provided.

    ServerErrorException

    Thrown when Kuracord is unable to process the request.

    | Improve this Doc View Source

    SendMessageAsync(KuracordChannel, String)

    Sends a message

    Declaration
    public Task<KuracordMessage> SendMessageAsync(KuracordChannel channel, string content)
    Parameters
    Type Name Description
    KuracordChannel channel

    Channel to send to.

    String content

    Message content to send.

    Returns
    Type Description
    Task<KuracordMessage>

    The Kuracord Message that was sent.

    Exceptions
    Type Condition
    UnauthorizedException

    Thrown when the client does not have the SendMessages permission.

    NotFoundException

    Thrown when the channel does not exist.

    BadRequestException

    Thrown when an invalid parameter was provided.

    ServerErrorException

    Thrown when Kuracord is unable to process the request.

    | Improve this Doc View Source

    SendMessageAsync(UInt64, String)

    Sends a message

    Declaration
    public Task<KuracordMessage> SendMessageAsync(ulong channelId, string content)
    Parameters
    Type Name Description
    UInt64 channelId

    ID of the channel to send to.

    String content

    Message content to send.

    Returns
    Type Description
    Task<KuracordMessage>

    The Kuracord Message that was sent.

    Exceptions
    Type Condition
    UnauthorizedException

    Thrown when the client does not have the SendMessages permission.

    NotFoundException

    Thrown when the channel does not exist.

    BadRequestException

    Thrown when an invalid parameter was provided.

    ServerErrorException

    Thrown when Kuracord is unable to process the request.

    | Improve this Doc View Source

    ToString()

    Returns a string representation of this guild.

    Declaration
    public override string ToString()
    Returns
    Type Description
    String

    String representation of this guild.

    Overrides
    Object.ToString()

    Operators

    | Improve this Doc View Source

    Equality(KuracordGuild, KuracordGuild)

    Gets whether the two KuracordGuild objects are equal.

    Declaration
    public static bool operator ==(KuracordGuild e1, KuracordGuild e2)
    Parameters
    Type Name Description
    KuracordGuild e1

    First member to compare.

    KuracordGuild e2

    Second member to compare.

    Returns
    Type Description
    Boolean

    Whether the two members are equal.

    | Improve this Doc View Source

    Inequality(KuracordGuild, KuracordGuild)

    Gets whether the two KuracordGuild objects are not equal.

    Declaration
    public static bool operator !=(KuracordGuild e1, KuracordGuild e2)
    Parameters
    Type Name Description
    KuracordGuild e1

    First member to compare.

    KuracordGuild e2

    Second member to compare.

    Returns
    Type Description
    Boolean

    Whether the two members are not equal.

    Implements

    IEquatable<>
    • Improve this Doc
    • View Source
    In This Article
    Back to top © 2023 KSharpPlus Contributors