Fixed exception if no trade object is available

This commit is contained in:
Oliver Hartmann 2021-03-14 14:12:48 +01:00
parent 58736954d1
commit 06468bb224

View File

@ -35,8 +35,9 @@ def send_to_format(type: str, message: data.Message, conf: dict()) -> None:
channel=message.channel.name, channel=message.channel.name,
user=message.user, user=message.user,
guild=message.guild, guild=message.guild,
to_from=message.to_from, to_from=message.to_from)
item=message.trade.item, if message.trade:
text = text.format(item=message.trade.item,
amount=message.trade.amount, amount=message.trade.amount,
currency=message.trade.currency, currency=message.trade.currency,
tab=message.trade.tab, tab=message.trade.tab,