C# Class DiscordSharp.Objects.DiscordMember

ファイルを表示 Open project: Luigifan/DiscordSharp Class Usage Examples

Private Properties

Property Type Description
Copy DiscordMember
DiscordMember Newtonsoft.Json
DiscordMember Newtonsoft.Json
Equals bool
SendActualMessage void
SetPresence void

Public Methods

Method Description
Ban ( int days ) : void

Bans this DiscordMember from the guild that's assumed from their parent property.

ChangeNickname ( string nickname ) : void

Changes the nickname for this user, if you have permission to do so.

Equals ( object obj ) : bool
GetAvatar ( ) : Bitmap

Gets the user's avatar.

GetAvatarURL ( ) : Uri

HasPermission ( DiscordSpecialPermissions permission ) : bool

Iterates all the roles the user has checking if any of the present have the permission you pass.

Kick ( ) : void

Kicks this DiscordMember from the guild that's assumed from their parent property.

SendMessage ( string message ) : void
SlideIntoDMs ( string message ) : void
operator ( ) : bool

Private Methods

Method Description
Copy ( ) : DiscordMember

Testing copy method.

DiscordMember ( ) : Newtonsoft.Json

should only be used for Newtonsoft.Json

DiscordMember ( DiscordClient parent ) : Newtonsoft.Json
Equals ( DiscordMember obj ) : bool
SendActualMessage ( string id, string message ) : void
SetPresence ( string status ) : void

Method Details

Ban() public method

Bans this DiscordMember from the guild that's assumed from their parent property.
public Ban ( int days ) : void
days int The number of days the user should be banned for, or 0 for infinite.
return void

ChangeNickname() public method

Changes the nickname for this user, if you have permission to do so.
public ChangeNickname ( string nickname ) : void
nickname string null for no nickname.
return void

Equals() public method

public Equals ( object obj ) : bool
obj object
return bool

GetAvatar() public method

Gets the user's avatar.
public GetAvatar ( ) : Bitmap
return System.Drawing.Bitmap

GetAvatarURL() public method

public GetAvatarURL ( ) : Uri
return System.Uri

HasPermission() public method

Iterates all the roles the user has checking if any of the present have the permission you pass.
public HasPermission ( DiscordSpecialPermissions permission ) : bool
permission DiscordSpecialPermissions The permission to check.
return bool

Kick() public method

Kicks this DiscordMember from the guild that's assumed from their parent property.
public Kick ( ) : void
return void

SendMessage() public method

public SendMessage ( string message ) : void
message string
return void

SlideIntoDMs() public method

public SlideIntoDMs ( string message ) : void
message string
return void

operator() public static method

public static operator ( ) : bool
return bool