176 r = requests.get(
177 f"https://some-random-api.ml/welcome/img/{bgtype}/{random.choice(backgrounds)}?type=join&username={member.name}&discriminator={member.discriminator}&avatar={member.avatar}&guildName=Baracchino%20Della%20Scuola&textcolor=white&memberCount={len(member.guild.members)}&key={os.environ.get('API_KEY')}"
178 )
179 """180 emb.set_thumbnail(url="https://i.imgur.com/R1KuVAG.png")
181 emb.set_author(name=member, icon_url=member.avatar)
182 emb.timestamp = datetime.now()
The string statement has not been assigned to anything. This is pointless and should be removed if not necessary. In case this is supposed to describe what's happening in the code, it is recommended to use comments or docstrings instead.
'Define a function to add 2 numbers here.'
def add(a, b):
return a + b
Use Comments:
# Define a function to add 2 numbers here.
def add(a, b):
return a + b
or, use docstrings:
def add(a, b):
'''Function to add 2 numbers here.'''
return a + b