Skip to content

Commit

Permalink
Merge pull request #217 from The-4th-Hokage/deepsource-fix-91de7498
Browse files Browse the repository at this point in the history
Remove length check in favour of truthiness of the object
  • Loading branch information
Dhruvacube authored Oct 17, 2021
2 parents 87225f6 + 652d4e1 commit eb30971
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion minato_namikaze/bot_files/cogs/moderation/moderation.py
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ async def _reactions(self, ctx, search=100):

total_reactions = 0
async for message in ctx.history(limit=search, before=ctx.message):
if len(message.reactions):
if message.reactions:
total_reactions += sum(r.count for r in message.reactions)
await message.clear_reactions()

Expand Down
2 changes: 1 addition & 1 deletion minato_namikaze/bot_files/cogs/weather.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ async def get_weather(
data["sys"]["sunset"] + data["timezone"]
).strftime("%H:%M")
embed = discord.Embed(colour=discord.Colour.blue())
if len(city) and len(country):
if city and country:
embed.add_field(
name="🌍 **Location**", value="{0}, {1}".format(city, country)
)
Expand Down

0 comments on commit eb30971

Please sign in to comment.