I'm making a Discord bot in Python using discord.py. I'd like to set/modify a global variable from an async thread.
message = ""
@bot.command()
async def test(ctx, msg):
message = msg
However this doesn't work. How can I achieve something that does this?