I've recently started revamping my discord bots by not using the on_message function plus a long list of if statements, but now that I've started using @bot.command(name=" ") if I try and use message.author it doesn't have a message to check for an Author. How can I fix this?
@bot.command(name="start")
async def some_crazy_function_name(ctx):
if not currentcreator == 0:
await message.channel.send("Someone is already making a profile,
please wait")
currentcreater = message.author
dir = r'C:\\Users\\User\Desktop\DiscordMMO\User-Profiles'
MessageAuthor = str(message.author)
ProfileDIR = os.path.join(dir,MessageAuthor)
doesExist = os.path.exists(ProfileDIR)
if doesExist == False:
embed=discord.Embed(title="Creating Profile", url="", description=MessageAuthor+", your profile is being create
messagevariable? You can also usectx.authorto fetch the author. You can also directly usectx.send()to respond. More info in the docs here - sommervold