Ask coding questions

← Back to all posts
i need help with some bot stuff
NathanTodd2 (8)

i am working on bot i already imported time i am also accepting people to help me with my bot this is the code for my time command vvvvvvv

async def time(ctx):
await ctx.send("the time is" + time)

please respond by mentioning me i would really like the help
also please mention me if you want me to add you to the bot

Answered by mesquite2234 (278) [earned 5 cycles]
View Answer
Comments
hotnewtop
mesquite2234 (278)
  1. await ctx.send("the time is" = time) needs to be indented
    and you need the @client.command decorater
  2. time is a module, and you dont have a time variable
    to get time:
from datetime import datetime

now = datetime.now()

current_time = now.strftime("%H:%M:%S")
NathanTodd2 (8)

@mesquite2234 would you mind working with me on it???

mesquite2234 (278)

@NathanTodd2 Sure, but I just started making bots a week ago

NathanTodd2 (8)

@mesquite2234 tell me when you here and at computer