mirror of
https://github.com/migatu/conjurer.git
synced 2026-07-19 08:12:09 +00:00
Maybe this will fix
This commit is contained in:
+15
-12
@@ -32,18 +32,6 @@ intents.moderation = True
|
|||||||
# on_member_ban - wyswietl na glownym kanale pieczatke "Niech spierdala"
|
# on_member_ban - wyswietl na glownym kanale pieczatke "Niech spierdala"
|
||||||
# on_member_unban - "mam wyjebane"
|
# on_member_unban - "mam wyjebane"
|
||||||
|
|
||||||
logger = logging.getLogger("discord")
|
|
||||||
logger.setLevel(logging.DEBUG)
|
|
||||||
handler = handlers.RotatingFileHandler(
|
|
||||||
filename=LOGFILE,
|
|
||||||
encoding=ENCODING,
|
|
||||||
mode="a",
|
|
||||||
maxBytes=6 * 1024 * 1024,
|
|
||||||
backupCount=6,
|
|
||||||
)
|
|
||||||
formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
|
|
||||||
handler.setFormatter(formatter)
|
|
||||||
logger.addHandler(handler)
|
|
||||||
random.seed()
|
random.seed()
|
||||||
client = commands.Bot(intents=intents, command_prefix="$")
|
client = commands.Bot(intents=intents, command_prefix="$")
|
||||||
|
|
||||||
@@ -52,6 +40,8 @@ client = commands.Bot(intents=intents, command_prefix="$")
|
|||||||
@client.event
|
@client.event
|
||||||
async def on_ready():
|
async def on_ready():
|
||||||
"""Metoda wywoływana przy połączeniu do serwera."""
|
"""Metoda wywoływana przy połączeniu do serwera."""
|
||||||
|
logger = logging.getLogger("discord")
|
||||||
|
|
||||||
logger.debug("%s has connected to Discord!", client.user)
|
logger.debug("%s has connected to Discord!", client.user)
|
||||||
# TODO: load vs reload
|
# TODO: load vs reload
|
||||||
logger.info("Reactor: online")
|
logger.info("Reactor: online")
|
||||||
@@ -80,6 +70,19 @@ async def on_ready():
|
|||||||
|
|
||||||
# *================================== Run
|
# *================================== Run
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
logger = logging.getLogger("discord")
|
||||||
|
logger.setLevel(logging.DEBUG)
|
||||||
|
handler = handlers.RotatingFileHandler(
|
||||||
|
filename=LOGFILE,
|
||||||
|
encoding=ENCODING,
|
||||||
|
mode="a",
|
||||||
|
maxBytes=6 * 1024 * 1024,
|
||||||
|
backupCount=6,
|
||||||
|
)
|
||||||
|
formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
|
||||||
|
handler.setFormatter(formatter)
|
||||||
|
logger.addHandler(handler)
|
||||||
|
|
||||||
logger.info("Starting discord bot")
|
logger.info("Starting discord bot")
|
||||||
threads = []
|
threads = []
|
||||||
logger.info("Starting discord bot: Creating threads")
|
logger.info("Starting discord bot: Creating threads")
|
||||||
|
|||||||
Reference in New Issue
Block a user