Table of Contents

Class InviteModuleBuilder

Namespace
Kook
Assembly
Kook.Net.Core.dll

Represents a invite module builder for creating an InviteModule.

public class InviteModuleBuilder : IModuleBuilder, IEquatable<InviteModuleBuilder>, IEquatable<IModuleBuilder>
Inheritance
InviteModuleBuilder
Implements
Inherited Members

Constructors

InviteModuleBuilder()

Initializes a new instance of the InviteModuleBuilder class.

public InviteModuleBuilder()

InviteModuleBuilder(string)

Initializes a new instance of the InviteModuleBuilder class.

public InviteModuleBuilder(string code)

Parameters

code string

Properties

Code

Gets or sets the code of the invite.

public string? Code { get; set; }

Property Value

string

A string representing the code of the invite.

Type

Specifies the module type of the IModule this builder creates.

public ModuleType Type { get; }

Property Value

ModuleType

A ModuleType representing the module type of the IModule this builder creates.

Methods

Build()

Builds this builder into an InviteModule.

public InviteModule Build()

Returns

InviteModule

An InviteModule representing the built invite module object.

Exceptions

ArgumentNullException

The Code is null.

ArgumentException

The Code is empty or whitespace.

Equals(InviteModuleBuilder?)

Determines whether the specified InviteModuleBuilder is equal to the current InviteModuleBuilder.

public bool Equals(InviteModuleBuilder? inviteModuleBuilder)

Parameters

inviteModuleBuilder InviteModuleBuilder

The InviteModuleBuilder to compare with the current InviteModuleBuilder.

Returns

bool

true if the specified InviteModuleBuilder is equal to the current InviteModuleBuilder; otherwise, false.

Equals(object?)

Determines whether the specified InviteModuleBuilder is equal to the current InviteModuleBuilder.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current InviteModuleBuilder.

Returns

bool

true if the specified InviteModuleBuilder is equal to the current InviteModuleBuilder; otherwise, false.

Remarks

If the object passes is an InviteModuleBuilder, Equals(InviteModuleBuilder?) will be called to compare the 2 instances.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

WithCode(string)

Sets the code of the invite.

public InviteModuleBuilder WithCode(string code)

Parameters

code string

The code of the invite to be set.

Returns

InviteModuleBuilder

The current builder.

Operators

operator ==(InviteModuleBuilder?, InviteModuleBuilder?)

Determines whether the specified InviteModuleBuilder is equal to the current InviteModuleBuilder.

public static bool operator ==(InviteModuleBuilder? left, InviteModuleBuilder? right)

Parameters

left InviteModuleBuilder
right InviteModuleBuilder

Returns

bool

true if the specified InviteModuleBuilder is equal to the current InviteModuleBuilder; otherwise, false.

implicit operator InviteModuleBuilder(string)

Initialized a new instance of the InviteModuleBuilder class with the specified code.

public static implicit operator InviteModuleBuilder(string code)

Parameters

code string

The code representing the invite.

Returns

InviteModuleBuilder

An InviteModuleBuilder object that is initialized with the specified code.

operator !=(InviteModuleBuilder?, InviteModuleBuilder?)

Determines whether the specified InviteModuleBuilder is not equal to the current InviteModuleBuilder.

public static bool operator !=(InviteModuleBuilder? left, InviteModuleBuilder? right)

Parameters

left InviteModuleBuilder
right InviteModuleBuilder

Returns

bool

true if the specified InviteModuleBuilder is not equal to the current InviteModuleBuilder; otherwise, false.