0

Im making a discord bot that should be able to take a message from an someone and post it in another channel but this line of code keeps giving me an indent error no matter how forward or backward I move it

@client.command()    
async def print(ctx, *args):        
  response = ""     
  for arg in args:          
    response = response + " " + arg        
    channel = client.get_channel(923900008158339102)<------ indentation error[enter image description here][1]      
  await channel.send(response)

here is a screenshot : https://i.stack.imgur.com/nem0m.png (the red ^ is the indentation error)

JNevill
  • 46,980
  • 4
  • 38
  • 63
Chaotic
  • 1
  • 1
  • For stackoverflow: After pasting your code, highlight it and click the `{}` button in the editor. That will place four spaces in front of each line of code and preserve white space and line feeds. – JNevill Sep 22 '22 at 18:26
  • Check your whitespace in the indents - be consistent with spaces and tabs. Python is very fussy! – Steve Folly Sep 22 '22 at 19:05
  • Use 4 spaces instead of tabs – walker Sep 22 '22 at 19:20

0 Answers0