Black formatting

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

@ -283,7 +283,9 @@ class Chatter(Cog):
async with ctx.typing(): async with ctx.typing():
self.chatbot = self._create_chatbot() 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") @chatter.command(name="minutes")
async def minutes(self, ctx: commands.Context, minutes: int): async def minutes(self, ctx: commands.Context, minutes: int):

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

@ -66,7 +66,9 @@ class Flag(Cog):
Set the number of days for flags to expire after for server Set the number of days for flags to expire after for server
""" """
await self.config.guild(ctx.guild).days.set(days) 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") @flagset.command(name="dm")
async def flagset_dm(self, ctx: commands.Context): async def flagset_dm(self, ctx: commands.Context):
@ -75,7 +77,9 @@ class Flag(Cog):
dm = await self.config.guild(ctx.guild).dm() dm = await self.config.guild(ctx.guild).dm()
await self.config.guild(ctx.guild).dm.set(not 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 @staticmethod
def _flag_template(): def _flag_template():

@ -180,14 +180,18 @@ class Hangman(Cog):
current = await self.config.guild(ctx.guild).emojis() current = await self.config.guild(ctx.guild).emojis()
await self.config.guild(ctx.guild).emojis.set(not current) 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"]) @commands.command(aliases=["hang"])
async def hangman(self, ctx, guess: str = None): async def hangman(self, ctx, guess: str = None):
"""Play a game of hangman against the bot!""" """Play a game of hangman against the bot!"""
if guess is None: if guess is None:
if self.the_data[ctx.guild]["running"]: 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._printgame(ctx.channel)
"""await self.bot.send_cmd_help(ctx)""" """await self.bot.send_cmd_help(ctx)"""
else: else:
@ -195,7 +199,9 @@ class Hangman(Cog):
self._startgame(ctx.guild) self._startgame(ctx.guild)
await self._printgame(ctx.channel) await self._printgame(ctx.channel)
elif not self.the_data[ctx.guild]["running"]: 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) self._startgame(ctx.guild)
await self._printgame(ctx.channel) await self._printgame(ctx.channel)
else: else:

@ -75,7 +75,9 @@ class LastSeen(Cog):
else: else:
last_seen = await self.config.member(member).seen() last_seen = await self.config.member(member).seen()
if last_seen is None: 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 return
last_seen = self.get_date_time(last_seen) last_seen = self.get_date_time(last_seen)

@ -48,7 +48,9 @@ class QRInvite(Cog):
invite = await ctx.channel.invites() invite = await ctx.channel.invites()
invite = invite[0] invite = invite[0]
except discord.Forbidden: 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 return
invite = invite.code invite = invite.code

Loading…
Cancel
Save