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

Merge collapsible if statements #341

Merged
merged 1 commit into from
Nov 27, 2021
Merged
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
23 changes: 11 additions & 12 deletions minato_namikaze/bot_files/lib/database/discord_database/tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,17 @@ def search_tag(
):
tags_found = []
async for i in self.channel.history(limit=None):
if tag_name:
if tag_name in i.content():
tags_found.append(i)
if creator_snowflake_id:
if creator_snowflake_id in i.content():
tags_found.append(i)
if server_id:
if server_id in i.content():
tags_found.append(i)
if tag_content:
if tag_content in i.content():
tags_found.append(i)
if tag_name and tag_name in i.content():
tags_found.append(i)
if (
creator_snowflake_id
and creator_snowflake_id in i.content()
):
tags_found.append(i)
if server_id and server_id in i.content():
tags_found.append(i)
if tag_content and tag_content in i.content():
tags_found.append(i)
return tags_found

async def save(self):
Expand Down