Нужно сделать чтобы выводилось только время
При выводе бот выводит и дату и время, нужно сделать чтобы выводилось только время.
@bot.command()
async def Test(ctx, time_: str):
current_time = None
try:
current_time = datetime.datetime.strptime(time_, '%H:%M')
except ValueError:
return await ctx.send(f"{ctx.author.mention} Вы неверно указали время. Пример: 15:00")
new_datetime = current_time + datetime.timedelta(hours=6)
await ctx.send(f'Test {current_time} - {new_datetime}')
Test 1900-01-01 13:55:00 - 1900-01-01 19:55:00