322 url=f"https://discord.com/channels/349243932447604736/688124678707216399", style=discord.ButtonStyle.url))
323 view.add_item(discord.ui.Button(label='Jailbreak Channel', emoji="<:Channel2:947546361715388417>",
324 url=f"https://discord.com/channels/349243932447604736/688122301975363591", style=discord.ButtonStyle.url))
325 res = await message.reply(embed=embed, view=view, delete_after=20)326 elif intent_news_triggered and subject_and_word_in_message:
327 embed = discord.Embed(color=discord.Color.orange())
328 embed.description = f"It appears you are asking about future jailbreaks. Nobody knows when a jailbreak will be released, but you can subscribe to notifications about releases by going to <#{db_guild.channel_applenews}>."
1658 embed.add_field(name="Duration of no user in voice channel", value=f"{voice_state.timer} s")
1659 return await self.respond(ctx, embed=embed)
1660 elif options == "queue":
1661 def getTotalDuration(data):1662 total_duration = 0
1663 for song in data:
1664 total_duration += song["duration"]
16 if string == "iPadOS":
17 return "iPadOS Updates"
18
19 starter = str("".join(list(takewhile(lambda x: x.islower(), string))))20
21 middle = " ".join(re.findall(
22 r'[A-Z0-9](?:[a-z0-9]+|[A-Z0-9]*(?=[A-Z0-9]|$))', string))
4from itertools import takewhile
5
6def derive_label(string):
7 enders = { 8 "AppleEventNews": " ",
9 "SubredditNews": " ",
10 "CommunityEvents": " ",
18
19 starter = str("".join(list(takewhile(lambda x: x.islower(), string))))
20
21 middle = " ".join(re.findall(22 r'[A-Z0-9](?:[a-z0-9]+|[A-Z0-9]*(?=[A-Z0-9]|$))', string))
23 #return f"{starter}{middle} {enders.get(string)}"
24 return string # FUCK OFF
An unused variable takes up space in the code, and can lead to confusion, and it should be removed. If this variable is necessary, name the variable _
to indicate that it will be unused, or start the name with unused
or _unused
.
def update():
for i in range(10): # Usused variable `i`
time.sleep(0.01)
display_result()
def update():
for _ in range(10):
time.sleep(0.01)
display_result()