Add logger to self
This commit is contained in:
parent
1056ef79e9
commit
adc72ab13c
1 changed files with 2 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
||||||
Module that provides code-evaluation commands.
|
Module that provides code-evaluation commands.
|
||||||
This entire module is locked to NioBot.owner.
|
This entire module is locked to NioBot.owner.
|
||||||
"""
|
"""
|
||||||
|
import logging
|
||||||
import shlex
|
import shlex
|
||||||
import tempfile
|
import tempfile
|
||||||
import textwrap
|
import textwrap
|
||||||
|
@ -22,6 +23,7 @@ class EvalModule(niobot.Module):
|
||||||
if not bot.owner_id:
|
if not bot.owner_id:
|
||||||
raise RuntimeError("No owner ID set in niobot. Refusing to load for security reasons.")
|
raise RuntimeError("No owner ID set in niobot. Refusing to load for security reasons.")
|
||||||
super().__init__(bot)
|
super().__init__(bot)
|
||||||
|
self.log = logging.getLogger(__name__)
|
||||||
|
|
||||||
async def owner_check(self, ctx: niobot.Context) -> bool:
|
async def owner_check(self, ctx: niobot.Context) -> bool:
|
||||||
"""Checks if the current user is the owner, and if not, gives them a very informative message."""
|
"""Checks if the current user is the owner, and if not, gives them a very informative message."""
|
||||||
|
|
Loading…
Reference in a new issue