diff options
| author | 2021-04-05 18:03:55 +0100 | |
|---|---|---|
| committer | 2021-04-05 18:03:55 +0100 | |
| commit | 60a73ae2cc033babbef2589bfd729b75f8d8ad12 (patch) | |
| tree | b05e51d819eb63f5e447d934f045d3edcff4d8a0 | |
| parent | Output stream command confimation in embed for automatic tz conversion (diff) | |
Convert back to datetime as Embed.timestamp doesn't support Arrow
| -rw-r--r-- | bot/exts/moderation/stream.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bot/exts/moderation/stream.py b/bot/exts/moderation/stream.py index 04c15e542..1bdcdc7d8 100644 --- a/bot/exts/moderation/stream.py +++ b/bot/exts/moderation/stream.py @@ -87,8 +87,9 @@ class Stream(commands.Cog): log.trace(f"Attempting to give temporary streaming permission to {member} ({member.id}).") if duration is None: - # If duration is None then calculate default duration + # Use default duration and convert back to datetime as Embed.timestamp doesn't support Arrow duration = arrow.utcnow() + timedelta(minutes=VideoPermission.default_permission_duration) + duration = duration.datetime elif duration.tzinfo is None: # Make duration tz-aware. # ISODateTime could already include tzinfo, this check is so it isn't overwritten. |