From 15edfc2b26ca2d01db23e22f6662a4a2254193f7 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Fri, 16 Jun 2017 22:17:24 -0400 Subject: [PATCH] Make checking for truth-ness of EmbedProxy easier. --- discord/embeds.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/discord/embeds.py b/discord/embeds.py index 30620498e..bc937b50b 100644 --- a/discord/embeds.py +++ b/discord/embeds.py @@ -42,6 +42,9 @@ class EmbedProxy: def __init__(self, layer): self.__dict__.update(layer) + def __len__(self): + return len(self.__dict__) + def __repr__(self): return 'EmbedProxy(%s)' % ', '.join(('%s=%r' % (k, v) for k, v in self.__dict__.items() if not k.startswith('_')))