Black formatting

pull/121/head
bobloy 4 years ago
parent 151eca1c76
commit d43a1ec80c

@ -229,7 +229,7 @@ class CCRole(commands.Cog):
cmd_list = "Custom commands:\n\n" + cmd_list
if (
len(cmd_list) < 1500
len(cmd_list) < 1500
): # I'm allowed to have arbitrary numbers for when it's too much to dm dammit
await ctx.send(box(cmd_list))
else:
@ -309,7 +309,7 @@ class CCRole(commands.Cog):
async def eval_cc(self, cmd, message: discord.Message, ctx: commands.Context):
"""Does all the work"""
if cmd["proles"] and not (
set(role.id for role in message.author.roles) & set(cmd["proles"])
set(role.id for role in message.author.roles) & set(cmd["proles"])
):
return # Not authorized, do nothing

@ -219,7 +219,7 @@ class Chatter(Cog):
@chatter.command(name="algorithm", aliases=["algo"])
async def chatter_algorithm(
self, ctx: commands.Context, algo_number: int, threshold: float = None
self, ctx: commands.Context, algo_number: int, threshold: float = None
):
"""
Switch the active logic algorithm to one of the three. Default after reload is Spacy
@ -283,7 +283,9 @@ class Chatter(Cog):
async with ctx.typing():
self.chatbot = self._create_chatbot()
await ctx.maybe_send_embed(f"Model has been switched to {self.tagger_language.ISO_639_1}")
await ctx.maybe_send_embed(
f"Model has been switched to {self.tagger_language.ISO_639_1}"
)
@chatter.command(name="minutes")
async def minutes(self, ctx: commands.Context, minutes: int):

@ -116,8 +116,10 @@ class Dad(Cog):
else:
out = cleaned_content[4:]
try:
await message.channel.send(f"Hi {out}, I'm {guild.me.display_name}!",
allowed_mentions=discord.AllowedMentions)
await message.channel.send(
f"Hi {out}, I'm {guild.me.display_name}!",
allowed_mentions=discord.AllowedMentions,
)
except discord.HTTPException:
return

@ -66,7 +66,9 @@ class Flag(Cog):
Set the number of days for flags to expire after for server
"""
await self.config.guild(ctx.guild).days.set(days)
await ctx.maybe_send_embed("Number of days for new flags to expire is now {} days".format(days))
await ctx.maybe_send_embed(
"Number of days for new flags to expire is now {} days".format(days)
)
@flagset.command(name="dm")
async def flagset_dm(self, ctx: commands.Context):
@ -75,7 +77,9 @@ class Flag(Cog):
dm = await self.config.guild(ctx.guild).dm()
await self.config.guild(ctx.guild).dm.set(not dm)
await ctx.maybe_send_embed("DM-ing members when they get a flag is now set to **{}**".format(not dm))
await ctx.maybe_send_embed(
"DM-ing members when they get a flag is now set to **{}**".format(not dm)
)
@staticmethod
def _flag_template():

@ -180,14 +180,18 @@ class Hangman(Cog):
current = await self.config.guild(ctx.guild).emojis()
await self.config.guild(ctx.guild).emojis.set(not current)
await ctx.maybe_send_embed("Emoji Letter reactions have been set to {}".format(not current))
await ctx.maybe_send_embed(
"Emoji Letter reactions have been set to {}".format(not current)
)
@commands.command(aliases=["hang"])
async def hangman(self, ctx, guess: str = None):
"""Play a game of hangman against the bot!"""
if guess is None:
if self.the_data[ctx.guild]["running"]:
await ctx.maybe_send_embed("Game of hangman is already running!\nEnter your guess!")
await ctx.maybe_send_embed(
"Game of hangman is already running!\nEnter your guess!"
)
await self._printgame(ctx.channel)
"""await self.bot.send_cmd_help(ctx)"""
else:
@ -195,7 +199,9 @@ class Hangman(Cog):
self._startgame(ctx.guild)
await self._printgame(ctx.channel)
elif not self.the_data[ctx.guild]["running"]:
await ctx.maybe_send_embed("Game of hangman is not yet running!\nStarting a game of hangman!")
await ctx.maybe_send_embed(
"Game of hangman is not yet running!\nStarting a game of hangman!"
)
self._startgame(ctx.guild)
await self._printgame(ctx.channel)
else:

@ -18,7 +18,7 @@ class LoveCalculator(Cog):
@commands.command(aliases=["lovecalc"])
async def lovecalculator(
self, ctx: commands.Context, lover: discord.Member, loved: discord.Member
self, ctx: commands.Context, lover: discord.Member, loved: discord.Member
):
"""Calculate the love percentage!"""
@ -34,8 +34,8 @@ class LoveCalculator(Cog):
try:
description = (
soup_object.find("div", attrs={"class": "result__score"})
.get_text()
.strip()
.get_text()
.strip()
)
except:
description = "Dr. Love is busy right now"

@ -75,7 +75,9 @@ class LastSeen(Cog):
else:
last_seen = await self.config.member(member).seen()
if last_seen is None:
await ctx.maybe_send_embed(embed=discord.Embed(description="I've never seen this user"))
await ctx.maybe_send_embed(
embed=discord.Embed(description="I've never seen this user")
)
return
last_seen = self.get_date_time(last_seen)

@ -48,7 +48,9 @@ class QRInvite(Cog):
invite = await ctx.channel.invites()
invite = invite[0]
except discord.Forbidden:
await ctx.maybe_send_embed("No permission to get an invite, please provide one")
await ctx.maybe_send_embed(
"No permission to get an invite, please provide one"
)
return
invite = invite.code

Loading…
Cancel
Save