Исправление: перенос import time из __init__ на уровень модуля
This commit is contained in:
parent
aa40f2b7ff
commit
57d7792755
3
bot.py
3
bot.py
@ -3,6 +3,7 @@ import logging
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import threading
|
import threading
|
||||||
|
import time
|
||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING
|
||||||
|
|
||||||
import discord
|
import discord
|
||||||
@ -28,8 +29,6 @@ class BotRunner:
|
|||||||
"""Управляет жизненным циклом бота."""
|
"""Управляет жизненным циклом бота."""
|
||||||
|
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
import time
|
|
||||||
|
|
||||||
self.bot = commands.Bot(command_prefix="!", intents=intents)
|
self.bot = commands.Bot(command_prefix="!", intents=intents)
|
||||||
self.bot._start_time = time.time()
|
self.bot._start_time = time.time()
|
||||||
self.stop_event = threading.Event()
|
self.stop_event = threading.Event()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user