@client.command(aliases= ['balance', 'cash'])
async def __balance(ctx, member: discord.Member = None):
if member is None:
if fetch := cursor.execute("SELECT cash FROM users WHERE id = {}".format(ctx.author.id)).fetchone():
description = f"""Баланс пользователя **{ctx.author}** составляет **{cursor.execute("SELECT cash FROM users WHERE id = {}".format(ctx.author.id)).fetchone()[0]}:leaves:**"""
else:
if fetch := cursor.execute("SELECT cash FROM users WHERE id = {}".format(ctx.author.id)).fetchone():
description = f"""Баланс пользователя **{member}** составляет **{cursor.execute("SELECT cash FROM users WHERE id = {}".format(member.id)).fetchone()[0]}:leaves:**"""
@client.command(aliases= ['balance', 'cash'])
async def __balance(ctx, member: discord.Member = None):
if member is None:
if fetch := description = f"""Баланс пользователя **{ctx.author}** составляет **{cursor.execute("SELECT cash FROM users WHERE id = {}".format(ctx.author.id)).fetchone()[0]}:leaves:**"""
else:
if fetch := description = f"""Баланс пользователя **{ctx.author}** составляет **{cursor.execute("SELECT cash FROM users WHERE id = {}".format(ctx.author.id)).fetchone()[0]}:leaves:**"""
@client.command(aliases= ['balance', 'cash'])
async def __balance(ctx, member: discord.Member = None):
if fetch := cursor.execute("SELECT cash FROM users WHERE id = {}".format(ctx.author.id)).fetchone():
description = f"""Баланс пользователя **{ctx.author}** составляет **{fetch[0]}:leaves:**"""
else:
if fetch := cursor.execute("SELECT cash FROM users WHERE id = {}".format(member.id)).fetchone():
description = f"""Баланс пользователя **{member}** составляет **{fetch[0]}:leaves:**"""
if msg in hello_words:
emb = discord.Embed( color=0xDB952B, title='Привет чего хотел?' )
await message.channel.send( embed=emb )
@client.event
async def on_message( message):
msg = message.content.lower()
if msg in hello_words:
await message.channel.send( 'привет чего хотел?' )
if msg in answer_words:
await message.channel.send( 'пропиши .help' )
await bot.process_commands(message)