I am trying to send a message through the python console. Right now, I have everything working when I set it as a bot command (When I do the command !dm
, I get prompted in the python console The user Id and message I want to DM. This all works. However, what I am trying to do is for the program to prompt me as soon as it is started.
My current code:
@bot.command(name='dm')
async def messageinput(ctx):
member = input('Enter Member ID: ')
message = input('Enter Message: ')
print(member)
print(message)
user = bot.get_user(int(member))
await user.send(message)
@bot.event
async def on_ready():
#await verifyloop()
print(Fore.CYAN + '|------------------------------------------|')
print(Fore.CYAN + '|--------------Bot is online!--------------|')
print(Fore.CYAN + '|------------------------------------------|')
#await messageinput()
How do I do this?