added .env
This commit is contained in:
15
test.py
15
test.py
@@ -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'))
|
||||
|
||||
Reference in New Issue
Block a user