minor refactor

This commit is contained in:
AF 2022-12-24 16:37:21 +00:00
parent d6d3b873de
commit 85aa795e35
2 changed files with 3 additions and 4 deletions

View File

@ -13,7 +13,6 @@ class Context:
self.message: discord.Message = message
self.client: discord.Client = client
self.channel: discord.abc.Messageable = message.channel
self.dm_or_text: Union[discord.DMChannel, discord.TextChannel] = message.channel # type: ignore
self.author: usertype = message.author
self.content: str = message.content
self.member: Optional[discord.Member] = message.author if isinstance(message.author, discord.Member) else None

View File

@ -1,4 +1,5 @@
import asyncio
import inspect
import os
import time
@ -43,7 +44,6 @@ class SLog(Instrumentation):
class FrameTrace(Instrumentation):
async def instrument(self, method, *args, **kwargs):
import inspect
frame = inspect.currentframe()
while frame is not None:
print(frame.f_code.co_filename, frame.f_lineno)