#๐ help with the "if" statement, how do i do the spaces in between
34 messages ยท Page 1 of 1 (latest)
@grizzled cypress
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
@commands.has_permissions(administrator=True)
@bot.command()
async def settings(ctx, x, y):
global configdel
global hide_NSFW
if x == "configdelchannel":
if y == "1":
configdel = True
await ctx.send("Successfully turned 'delchannel' on")
elif y == "0":
configdel = False
await ctx.send("Successfully turned 'delchannel' off")
else:
await ctx.send("Wrong input: return '1' or '0'")
elif x == "hidensfw":
if y == "1":
hide_NSFW = True
await ctx.send("Successfully enabled NSFW commands")
elif y == "0":
hide_NSFW = False
await ctx.send("Successfully disabled NSFW commands")
else:
await ctx.send("Wrong input: return '1' or '0'")
else:
await ctx.send("Wrong input: 'viewsetting' to view setting sub commands")
This is the same screenshot you posted yesterday/this morning.
I thought we resolved this.
This has the same indentation issue. The if is indented by three spaces, while the else is indented by four, which is why there's an error on the else line.
and keyword?
how did i just solve it
๐ญ
i gain superpowers right after posting
anyway gentlemna i solved my issue
duck
why is everybody invisible here?
I'm set as offline because someone would constantly wait until I came online and then start dumping homework on me.
That was like a month ago though, so I can probably set it to back online.
block them ig
bruh
In retrospect, ya, I should have just done that.
is there a chance ill catch u on the sub if i post?
theres literally a law that forces all apss that allow users to text each other to have a block button
For the next day and a bit, ya since I'm not working. I'm going back and forth between writing some code and checking discord on breaks.
what u writtin
I'm learning WebAssembly in Rust. So, running compiled Rust code in the browser.
my cousin said that theres a discord.py club in my city like no way im believing that ๐ญ
Can't speak for that.
like python? ye but not discord ๐
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.