Skip to content

Commit

Permalink
feat: Implement shortcut
Browse files Browse the repository at this point in the history
  • Loading branch information
LeadcodeDev committed May 13, 2023
1 parent 6ad3c67 commit 4273666
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/src/api/guilds/guild_member.dart
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,13 @@ class GuildMember {
/// ```
bool get isBannable => isManageable && permissions.has(ClientPermission.banMembers);

/// Returns weather of this is a [Guild] owner.
/// ```dart
/// final member = member.isOwner;
/// print(member);
/// ```
bool get isOwner => guild.owner.id == user.id;

/// Returns a taggable [String] representation of this.
@override
String toString () => '<@${_nickname != null ? '!' : ''}${user.id}>';
Expand Down

0 comments on commit 4273666

Please sign in to comment.