Black formatting
This commit is contained in:
parent
151eca1c76
commit
d43a1ec80c
@ -229,7 +229,7 @@ class CCRole(commands.Cog):
|
|||||||
cmd_list = "Custom commands:\n\n" + cmd_list
|
cmd_list = "Custom commands:\n\n" + cmd_list
|
||||||
|
|
||||||
if (
|
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
|
): # I'm allowed to have arbitrary numbers for when it's too much to dm dammit
|
||||||
await ctx.send(box(cmd_list))
|
await ctx.send(box(cmd_list))
|
||||||
else:
|
else:
|
||||||
@ -309,7 +309,7 @@ class CCRole(commands.Cog):
|
|||||||
async def eval_cc(self, cmd, message: discord.Message, ctx: commands.Context):
|
async def eval_cc(self, cmd, message: discord.Message, ctx: commands.Context):
|
||||||
"""Does all the work"""
|
"""Does all the work"""
|
||||||
if cmd["proles"] and not (
|
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
|
return # Not authorized, do nothing
|
||||||
|
|
||||||
|
@ -219,7 +219,7 @@ class Chatter(Cog):
|
|||||||
|
|
||||||
@chatter.command(name="algorithm", aliases=["algo"])
|
@chatter.command(name="algorithm", aliases=["algo"])
|
||||||
async def chatter_algorithm(
|
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
|
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():
|
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:
|
||||||
|
@ -18,7 +18,7 @@ class LoveCalculator(Cog):
|
|||||||
|
|
||||||
@commands.command(aliases=["lovecalc"])
|
@commands.command(aliases=["lovecalc"])
|
||||||
async def lovecalculator(
|
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!"""
|
"""Calculate the love percentage!"""
|
||||||
|
|
||||||
@ -34,8 +34,8 @@ class LoveCalculator(Cog):
|
|||||||
try:
|
try:
|
||||||
description = (
|
description = (
|
||||||
soup_object.find("div", attrs={"class": "result__score"})
|
soup_object.find("div", attrs={"class": "result__score"})
|
||||||
.get_text()
|
.get_text()
|
||||||
.strip()
|
.strip()
|
||||||
)
|
)
|
||||||
except:
|
except:
|
||||||
description = "Dr. Love is busy right now"
|
description = "Dr. Love is busy right now"
|
||||||
|
@ -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…
x
Reference in New Issue
Block a user