import logging
from logging import Formatter, FileHandler, StreamHandler
from os import environ
from sys import stdout

from discord.ext.commands import Bot
from dotenv import load_dotenv

load_dotenv()
DISCORD_TOKEN = environ["DISCORD_TOKEN"]

logger = logging.getLogger('discord')
logger.setLevel(logging.DEBUG)
# noinspection SpellCheckingInspection
formatter = Formatter('%(asctime)s:%(levelname)s:%(name)s: %(message)s')
handler = FileHandler(filename='discord.log', encoding='utf-8', mode='w')
handler.setFormatter(formatter)
logger.addHandler(handler)
handler = StreamHandler(stream=stdout)
handler.setFormatter(formatter)
logger.addHandler(handler)

bot = Bot(command_prefix="!")


@bot.event
async def on_ready():
    logger.info(f"bot is ready ----------")
    await bot.load_extension("cogs.Manager")


bot.run(DISCORD_TOKEN)

1922703a6b41ba97e4da059530a84c8ea5623b9d
<mask token>

<mask token>
load_dotenv()
<mask token>
logger.setLevel(logging.DEBUG)
<mask token>
handler.setFormatter(formatter)
logger.addHandler(handler)
<mask token>
handler.setFormatter(formatter)
logger.addHandler(handler)
<mask token>


@bot.event
async def on_ready():
    logger.info(f'bot is ready ----------')
    await bot.load_extension('cogs.Manager')


bot.run(DISCORD_TOKEN)

<mask token>
load_dotenv()
DISCORD_TOKEN = environ['DISCORD_TOKEN']
logger = logging.getLogger('discord')
logger.setLevel(logging.DEBUG)
formatter = Formatter('%(asctime)s:%(levelname)s:%(name)s: %(message)s')
handler = FileHandler(filename='discord.log', encoding='utf-8', mode='w')
handler.setFormatter(formatter)
logger.addHandler(handler)
handler = StreamHandler(stream=stdout)
handler.setFormatter(formatter)
logger.addHandler(handler)
bot = Bot(command_prefix='!')


@bot.event
async def on_ready():
    logger.info(f'bot is ready ----------')
    await bot.load_extension('cogs.Manager')


bot.run(DISCORD_TOKEN)

import logging
from logging import Formatter, FileHandler, StreamHandler
from os import environ
from sys import stdout
from discord.ext.commands import Bot
from dotenv import load_dotenv
load_dotenv()
DISCORD_TOKEN = environ['DISCORD_TOKEN']
logger = logging.getLogger('discord')
logger.setLevel(logging.DEBUG)
formatter = Formatter('%(asctime)s:%(levelname)s:%(name)s: %(message)s')
handler = FileHandler(filename='discord.log', encoding='utf-8', mode='w')
handler.setFormatter(formatter)
logger.addHandler(handler)
handler = StreamHandler(stream=stdout)
handler.setFormatter(formatter)
logger.addHandler(handler)
bot = Bot(command_prefix='!')


@bot.event
async def on_ready():
    logger.info(f'bot is ready ----------')
    await bot.load_extension('cogs.Manager')


bot.run(DISCORD_TOKEN)

import logging
from logging import Formatter, FileHandler, StreamHandler
from os import environ
from sys import stdout

from discord.ext.commands import Bot
from dotenv import load_dotenv

load_dotenv()
DISCORD_TOKEN = environ["DISCORD_TOKEN"]

logger = logging.getLogger('discord')
logger.setLevel(logging.DEBUG)
# noinspection SpellCheckingInspection
formatter = Formatter('%(asctime)s:%(levelname)s:%(name)s: %(message)s')
handler = FileHandler(filename='discord.log', encoding='utf-8', mode='w')
handler.setFormatter(formatter)
logger.addHandler(handler)
handler = StreamHandler(stream=stdout)
handler.setFormatter(formatter)
logger.addHandler(handler)

bot = Bot(command_prefix="!")


@bot.event
async def on_ready():
    logger.info(f"bot is ready ----------")
    await bot.load_extension("cogs.Manager")


bot.run(DISCORD_TOKEN)
