Answer the question
In order to leave comments, you need to log in
How to translate a fact into Russian?
I ran the following command:
@slash_command(name='cat',description="Увидеть рандомного кошару")
async def _cat(ctx):
response = requests.get('https://some-random-api.ml/img/cat') # Get-запрос
json_data = json.loads(response.text) # Извлекаем JSON
ter = requests.get('https://some-random-api.ml/facts/cat') # Get-запрос
factor = json.loads(ter.text)
embed = discord.Embed(color = 0xff9900, title = 'Милый Котик, осторожно вы влюбуетесь! ',description=f"Рандомный факт о котах - {factor["fact"]}")
embed.set_image(url = json_data['link']) # Устанавливаем картинку Embed'a
await ctx.reply(embed = embed) # Отправляем Embed
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question