Skip to content

Commit 02fca5b

Browse files
committed
+ Added attributes and cooldown to google command
1 parent 3603528 commit 02fca5b

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

exts/utilities.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,16 @@ async def unmorse(self, ctx, *, code):
165165
except ValueError:
166166
await ctx.error("Invalid morse code!")
167167

168-
@commands.command(aliases=("g",))
168+
@commands.command(
169+
aliases=("g",),
170+
brief="Searches Google",
171+
description=(
172+
"Searches Google\n"
173+
'Support "special" results, currently supports: Complementary '
174+
"Results, Currency Converter"
175+
),
176+
)
177+
@commands.cooldown(1, 5, commands.BucketType.guild)
169178
async def google(self, ctx, *, query: str):
170179
msg = await ctx.try_reply(embed=ZEmbed.loading(title="Searching..."))
171180
results = await self.googlesearch.search(query)
@@ -199,7 +208,7 @@ async def google(self, ctx, *, query: str):
199208
if complementary.description
200209
else ""
201210
)
202-
+ "\n".join([f"**{i}**`{j}`" for i, j in complementary.info])
211+
+ "\n".join([f"**{i}**`{j}`" for i, j in complementary.info]),
203212
)
204213

205214
if special:

0 commit comments

Comments
 (0)