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) stmt = select(Presences.Presence)
presences = session.scalars(stmt) presences = session.scalars(stmt)
message = ""
# have 2 loops so that the "if search" check isn't done repeatedly
if search: if search:
for presence in presences: message = "\n".join(
if search.lower() in presence.lower(): [
message += f"{presence}\n" presence
for presence in presences
if search.lower() in presence.lower()
]
)
else: else:
for presence in presences: message = "\n".join(list(presences))
message += f"{presence}\n"
await interaction.followup.send(content=message, ephemeral=True) await interaction.followup.send(content=message, ephemeral=True)