Написал вот такой вот кодик:
UnboundLocalError: local variable 'embed' referenced before assignment?
@bot.event
async def on_message(message):
await bot.process_commands( message )
splited = message.content.split(' ')
if message.author.bot is False:
if f'<@!822563111571423254>' in splited[0]:
try:
if splited[1] is None:
pass
else:
pass
except:
embed = discord.Embed(title = f'Welcome!', timestamp = message.created_at, colour = discord.Colour.from_rgb(199, 182, 219), description = f'''
Hi {message.author.display_name}, my name **Osidium**!
• My prefix - `o+`
• Write the command 'o+help' to find out all my features.
• Want to know a little about me? Write `o-about`.
• Need help on the bot, or found a bug/error? Visit our server: [Join](https://discord.gg/tYr5xeSS79)''')
await message.reply(embed=embed)
И получил ошибку:
Traceback (most recent call last):
File "C:\Users\User\Downloads\Osidium\bot.py", line 188, in on_message
await message.reply(embed=embed)
UnboundLocalError: local variable 'embed' referenced before assignment
Ignoring exception in on_message