Skip to content

Commit

Permalink
Merge branch 'Cog-Creators:V3/develop' into V3/develop
Browse files Browse the repository at this point in the history
  • Loading branch information
sravan1946 authored Apr 13, 2024
2 parents 8285817 + 97b4679 commit 779d831
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
13 changes: 6 additions & 7 deletions redbot/cogs/streams/streamtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,17 +221,16 @@ async def make_embed(self, data):
if vid_data["liveStreamingDetails"].get("scheduledStartTime", None) is not None:
if "actualStartTime" not in vid_data["liveStreamingDetails"]:
start_time = parse_time(vid_data["liveStreamingDetails"]["scheduledStartTime"])
start_time_unix = time.mktime(start_time.timetuple())
start_in = start_time - datetime.now(timezone.utc)
if start_in.total_seconds() > 0:
embed.description = _("This stream will start in {time}").format(
time=humanize_timedelta(
timedelta=timedelta(minutes=start_in.total_seconds() // 60)
) # getting rid of seconds
embed.description = _("This stream will start <t:{time}:R>").format(
time=int(start_time_unix)
)
else:
embed.description = _(
"This stream was scheduled for {min} minutes ago"
).format(min=round((start_in.total_seconds() * -1) // 60))
embed.description = _("This stream was scheduled for <t:{time}:R>").format(
time=int(start_time_unix)
)
embed.timestamp = start_time
is_schedule = True
else:
Expand Down
2 changes: 1 addition & 1 deletion redbot/core/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -2324,7 +2324,7 @@ async def send_interactive(
*,
user: Optional[discord.User] = None,
box_lang: Optional[str] = None,
timeout: int = 15,
timeout: int = 60,
join_character: str = "",
) -> List[discord.Message]:
"""
Expand Down
2 changes: 1 addition & 1 deletion redbot/core/commands/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ async def send_interactive(
self,
messages: Iterable[str],
box_lang: Optional[str] = None,
timeout: int = 15,
timeout: int = 60,
join_character: str = "",
) -> List[discord.Message]:
"""
Expand Down

0 comments on commit 779d831

Please sign in to comment.