Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use identity check for comparison to a singleton #226

Merged
merged 2 commits into from
Oct 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions minato_namikaze/bot_files/cogs/img/fun.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ async def _8ball(self, ctx, *, question):
@commands.command(usage="[member.mention]")
async def spank(self, ctx, member: Optional[discord.Member]):
"""Spank someone"""
if member == None:
if member is None:
desc = f"** <@{ctx.author.id}> spanks themselves !!! LOL!**"
elif member in ["@everyone", "@here"]:
await ctx.send(f"** <@{ctx.author.id}> why would you spank @everyone? **")
Expand All @@ -59,7 +59,7 @@ async def spank(self, ctx, member: Optional[discord.Member]):
@commands.command(usage="<member.mention>")
async def slap(self, ctx, member: Optional[discord.Member]):
"""Slap someone"""
if member == None:
if member is None:
desc = f"** <@{ctx.author.id}> slaps themselves !!! LOL!**"
elif member in ["@everyone", "@here"]:
await ctx.send(f"** <@{ctx.author.id}> why would you slap @everyone? **")
Expand Down Expand Up @@ -102,7 +102,7 @@ async def slap(self, ctx, member: Optional[discord.Member]):
@commands.command(usage="[member.mention]")
async def hug(self, ctx, member: Optional[discord.Member]):
"""Hug someone"""
if member == None:
if member is None:
desc = f"** <@{ctx.author.id}> hugs themselves :heart: :heart: :heart: :heart: **"
elif member in ["@everyone", "@here"]:
await ctx.send(f"** <@{ctx.author.id}> why would you hug @everyone? **")
Expand All @@ -128,7 +128,7 @@ async def hug(self, ctx, member: Optional[discord.Member]):
@commands.command(usage="[member.mention]")
async def poke(self, ctx, member: Optional[discord.Member]):
"""Poke someone"""
if member == None:
if member is None:
desc = f"** <@{ctx.author.id}> pokes themselves! **"
elif member in ["@everyone", "@here"]:
await ctx.send(f"** <@{ctx.author.id}> why would you poke @everyone? **")
Expand All @@ -154,7 +154,7 @@ async def poke(self, ctx, member: Optional[discord.Member]):
@commands.command(usage="[member.mention]")
async def high5(self, ctx, member: Optional[discord.Member]):
"""Do a highfive"""
if member == None:
if member is None:
desc = f"**<@{ctx.author.id}> high-fives **"
elif member in ["@everyone", "@here"]:
desc = f"**@everyone <@{ctx.author.id}> high-fives **"
Expand All @@ -179,7 +179,7 @@ async def high5(self, ctx, member: Optional[discord.Member]):
@commands.command(usage="[member.mention]")
async def party(self, ctx, member: Optional[discord.Member]):
"""Party with someone"""
if member == None:
if member is None:
desc = f"**<@{ctx.author.id}> is partying !!**"
elif member in ["@everyone", "@here"]:
desc = f"**@everyone <@{ctx.author.id}> is partying!! come join them !! **"
Expand Down
8 changes: 4 additions & 4 deletions minato_namikaze/bot_files/cogs/moderation/moderation.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,8 @@ async def ar(
role: Union[int, discord.Role],
):
"""Add roles"""
member = get_user(member if member !=
None else ctx.message.author, ctx)
member = get_user(
member if member is not None else ctx.message.author, ctx)
role = get_roles(role, ctx)
await member.add_roles(role)
e = Embed(
Expand Down Expand Up @@ -331,8 +331,8 @@ async def warn_handler(self, ctx, error):
@commands.check(check_if_warning_system_setup)
async def warnlist(self, ctx, member: Optional[Union[int, discord.Member]] = None):
"""Get the no. of warns for a specified user"""
member = get_user(member if member !=
None else ctx.message.author, ctx)
member = get_user(
member if member is not None else ctx.message.author, ctx)
e = Embed(title="Type the below message in the search bar")
search_image = discord.File(
join(self.bot.minato_dir, "discord", "search.png"), filename="search.png"
Expand Down