diff --git a/cogs/saltstraw.py b/cogs/saltstraw.py index e124f16..657e24f 100644 --- a/cogs/saltstraw.py +++ b/cogs/saltstraw.py @@ -20,8 +20,9 @@ class SaltStraw(BotBaseCog): self.url = "https://saltandstraw.com/pages/flavors" @commands.command() - async def test(self, ctx): - await self.parse() + async def icecream(self, ctx): + message = await self.parse() + await ctx.send(message) self.logger.info(f"SaltStraw command called by {ctx.author.name}") async def parse(self): @@ -36,8 +37,11 @@ class SaltStraw(BotBaseCog): for item in parent_sets: child_set = item.find_all("div", limit=3) #limit=3 skips everything past each description, i.e. ingredients/allergens flavor_dict[child_set[0].string] = child_set[1].string #grabbing only the title and description + message = "" for item in flavor_dict: print(f"\n{item}:\n{flavor_dict[item]}\n\n") + message += f"\n{item}:\n{flavor_dict[item]}\n\n" + return message async def setup(bot): await bot.add_cog(SaltStraw(bot)) \ No newline at end of file