From b9bf89b799dbf3788b23926dabe4e9dd54d60c86 Mon Sep 17 00:00:00 2001 From: bobloy Date: Mon, 3 Aug 2020 16:11:58 -0400 Subject: [PATCH] Embeds --- sherlock/sherlock.py | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/sherlock/sherlock.py b/sherlock/sherlock.py index 79ec7db..531d66b 100644 --- a/sherlock/sherlock.py +++ b/sherlock/sherlock.py @@ -42,6 +42,22 @@ class Sherlock(commands.Cog): queries.add(member.nick) queries = list(queries) - results = await execute_queries(queries=queries, platforms=self.platforms) - - await ctx.send("Hello world") + async with ctx.typing(): + results = await execute_queries(queries=queries, platforms=self.platforms) + + for result in results: + out = discord.Embed( + title=str(result.platform), + url=result.link, + description=f"Valid: {result.valid}\nAvailable: {result.available}", + ) + # out.description = + # out.add_field(name=result.platform, value=) + + # out = "\n".join( + # f"{result.query} on {result.platform}: {result.message} " + # f"(Success: {result.success}, Valid: {result.valid}, Available: {result.available})" + # for result in results + # ) + + await ctx.send(embed=out)