added .env

This commit is contained in:
2022-08-28 20:36:58 +03:00
parent 78a477f21a
commit caa8d6b20e
9 changed files with 59 additions and 29 deletions

15
test.py
View File

@@ -1,18 +1,18 @@
import asyncio
import logging
import os
import sys
from os import path
import pisya_bot
import disnake
from disnake import OptionChoice, OptionType, Option
from disnake.ext import commands
from dotenv import load_dotenv
from lib.CogsPrepare import work_with_cogs
from lib.Comands import determine_prefix
from lib.Comands import determine_prefix, check_conf
if not path.isfile('prefix.json'):
with open('prefix.json', 'w+', encoding='utf-8') as f:
f.write("")
load_dotenv()
check_conf()
intents = disnake.Intents(messages=True,
guilds=True,
@@ -37,6 +37,7 @@ asyncio.run(work_with_cogs('load', bot))
async def on_ready():
logging.info(f'Bot started')
logging.info('We have logged in as {0.user}'.format(bot))
logging.info(f'{pisya_bot.__version__}')
@bot.slash_command(
@@ -65,4 +66,4 @@ async def slash_cogs(inter, what_do):
await inter.response.send_message('You`re not bot owner', ephemeral=True)
bot.run('OTQ2ODE5MDA0MzE0NTcwODUy.YhkP6Q.dhFqi2MJMrxzHt5FtjK5Cl-5BI8')
bot.run(os.getenv('TOKEN'))