Merge branch '39-view-presences'
build_latest / build (push) Successful in 1m26s

This commit is contained in:
2023-12-22 21:33:45 -05:00
+8 -8
View File
@@ -54,16 +54,16 @@ class ViewCog(commands.Cog, name="View Commands"):
stmt = select(Presences.Presence)
presences = session.scalars(stmt)
message = ""
# have 2 loops so that the "if search" check isn't done repeatedly
if search:
for presence in presences:
if search.lower() in presence.lower():
message += f"{presence}\n"
message = "\n".join(
[
presence
for presence in presences
if search.lower() in presence.lower()
]
)
else:
for presence in presences:
message += f"{presence}\n"
message = "\n".join(list(presences))
await interaction.followup.send(content=message, ephemeral=True)