diff --git a/plugin/discord/cog.py b/plugin/discord/cog.py index f044674..0b2850a 100644 --- a/plugin/discord/cog.py +++ b/plugin/discord/cog.py @@ -63,11 +63,16 @@ class VoiceLogCog(LionCog): name="Warning", value="Could not find voice session to end, statistics may be incorrect.", ) + else: + embed.add_field( + name="Session", + value=f"Voice session lasted {session.duration} seconds!", + ) if after_channel: session = await self.start_voice_session(member, after_channel, now) if session: - embed.add_footer(f"Session #{session.sessionid}") + embed.set_footer(text=f"Session #{session.sessionid}") await hook.send(embed=embed) @@ -83,7 +88,7 @@ class VoiceLogCog(LionCog): async def end_voice_session(self, member, channel, ended_at): # Get the last open voice session to close it open_sessions = await VoiceLogSession.fetch_where( - guildid=member.guildid, + guildid=member.guild_id, userid=member.id, channelid=channel.id, duration=None,