From 42736669ec9084321087f08cdd5a2a326fd0b7e2 Mon Sep 17 00:00:00 2001 From: LeadcodeDev Date: Sat, 13 May 2023 08:53:58 +0200 Subject: [PATCH] feat: Implement shortcut --- lib/src/api/guilds/guild_member.dart | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/src/api/guilds/guild_member.dart b/lib/src/api/guilds/guild_member.dart index 43add4e4f..757e400c3 100644 --- a/lib/src/api/guilds/guild_member.dart +++ b/lib/src/api/guilds/guild_member.dart @@ -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}>';