fix task
This commit is contained in:
@@ -22,7 +22,7 @@ async def read_json(guild: int, _param: str):
|
||||
Reads Json file to determite config strings
|
||||
:param guild: ID of Guild
|
||||
:param _param: Parameter in json file
|
||||
:return: value of parameter
|
||||
:return: value of parameter.
|
||||
"""
|
||||
with open('prefix.json', 'r', encoding='utf-8') as fp: # Open the JSON
|
||||
parameter = None
|
||||
|
||||
@@ -39,11 +39,11 @@ async def fill_bd(name: str, userid: int, isbot: bool, nick: str, guild: int):
|
||||
|
||||
async def add_audio(guild: int, user: int, audio: str, track: str = 'usertracks'):
|
||||
"""
|
||||
Adding audio into folder and DB
|
||||
Adding audio into а folder and DB
|
||||
:param guild: Guild id
|
||||
:param user:
|
||||
:param audio:
|
||||
:param track: usertracks or defaulttracks
|
||||
:param track: usertracks or defaulttracks.
|
||||
"""
|
||||
# audio = f'{DB.read_db(guild, user, track)}, {audio}'
|
||||
sql_update_query = f"""UPDATE "{guild}" set {track} = ? where userid = ?"""
|
||||
|
||||
4
main.py
4
main.py
@@ -13,9 +13,7 @@ threading.current_thread().name = "main"
|
||||
logging.basicConfig(stream=sys.stdout, filemode='w', level='INFO',
|
||||
format='%(asctime)s - %(levelname)s - %(threadName)s - %(message)s')
|
||||
|
||||
|
||||
intents = disnake.Intents.default()
|
||||
intents.members = True
|
||||
intents = disnake.Intents(members=True)
|
||||
bot = commands.Bot(command_prefix='$', guild_subscriptions=True, intents=intents)
|
||||
f = []
|
||||
for filenames in walk('audio'):
|
||||
|
||||
Reference in New Issue
Block a user