Код, который у меня есть:
weather = Weather(unit=Unit.CELSIUS)
location = weather.lookup_by_location('toronto')
forecasts = location.forecast
embed = (discord.Embed(title="-=-__THE WEATHER__-=-", color=0x15dbc7))
embed.add_field(name="Clouds", value=forecasts[0].text, inline=False)
embed.add_field(name="Date", value=forecasts[0].date, inline=False)
embed.add_field(name="High", value=forecasts[0].high, inline=False)
embed.add_field(name="Low", value=forecasts[0].low, inline=False)
await bot.say(embed=embed)
Как мне заменить 0 на переменную, которая ставится после команды?У меня есть код, который идентифицирует команду:
@bot.command(pass_context=True)
async def weather(ctx)
Используемый мной импорт:
import discord
from discord.ext import commands
from discord.ext.commands import Bot
import asyncio
import random
import weather
from weather import Weather, Unit