Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
EC2 Default User committed Nov 26, 2024
2 parents 5462f15 + 6ed032a commit f990f32
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
26 changes: 26 additions & 0 deletions cog_modules/random/cog.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,32 @@ async def tao_error(self, ctx, error):
f"Tao is shy, so you can only view him once every 30 seconds. Try again in {round(error.retry_after, 2)} seconds."
)

@commands.command(name="!zookie", aliases=["!zøøkie"])
@commands.cooldown(1, 30, commands.BucketType.user)
async def zookie(self, ctx: commands.Context):
num = random.randint(0, len(zookiePics) - 1)
info = f"Zookie #{num + 1} of {len(zookiePics)}."
pic = zookiePics[num]
zookieResources[pic] += 1
with open("zookieResources", "wb") as f:
pickle.dump(zookieResources, f)
most_common = zookieResources.most_common(2)
if most_common[0][1] != most_common[1][1] and pic == most_common[0][0]:
info += f" HammerBot's favorite Zookie pic! Shown {most_common[0][1]} times."
elif zookieResources[pic] == 1:
info += " First time shown! ^_^"
else:
info += f" Shown {zookieResources[pic]} times."
await ctx.send(info)
await ctx.send(pic)

@zookie.error
async def zookie_error(self, ctx, error):
if isinstance(error, commands.CommandOnCooldown):
await ctx.send(
f"Zookie likes to hide, so you can only view him once every 30 seconds. Try again in {round(error.retry_after, 2)} seconds."
)

@commands.command(name="?gizmo", aliases=["?tao"])
@commands.cooldown(1, 30, commands.BucketType.user)
async def gizmo_or_tao(self, ctx: commands.Context):
Expand Down
6 changes: 5 additions & 1 deletion gizmopics.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@
"https://cdn.discordapp.com/attachments/1105932220838989834/1276273207376351253/IMG_8135.jpg?ex=66d2d0cc&is=66d17f4c&hm=e319d1f76620aba0a4548dcd3a2b2cc65dcce3fc4a37150364ad651cfc466196&",
"https://cdn.discordapp.com/attachments/1105932220838989834/1260753340665561141/IMG_3465.jpg?ex=66d30b4c&is=66d1b9cc&hm=7e067140030de07cbf5c8eb095ec4d1f6f3f5943e9d31baa3746105eb5226606&",
"https://cdn.discordapp.com/attachments/1105932220838989834/1260753339621183638/IMG_3468.jpg?ex=66d30b4b&is=66d1b9cb&hm=8cac4b997fdabe7c9746854bc1765814454a36aacd3b9c329458d18d427ce297&",
"https://cdn.discordapp.com/attachments/1105932220838989834/1260753338752958614/IMG_3467.jpg?ex=66d30b4b&is=66d1b9cb&hm=55ed0709e455e0a8c170499d4596665119b047815dde5461f4a79269df093c64&"
"https://cdn.discordapp.com/attachments/1105932220838989834/1260753338752958614/IMG_3467.jpg?ex=66d30b4b&is=66d1b9cb&hm=55ed0709e455e0a8c170499d4596665119b047815dde5461f4a79269df093c64&",
]

taoPics = [
Expand Down Expand Up @@ -454,3 +454,7 @@
"https://cdn.discordapp.com/attachments/1158181434662584320/1158182189129797672/PXL_20210817_210128872.jpg?ex=651b50b7&is=6519ff37&hm=829fd1d2314d66969d0226176195cb2db57123b25830d47edd3c21aa5434fc3e&",
"https://cdn.discordapp.com/attachments/1158181434662584320/1158182189981249546/PXL_20210818_214212828.jpg?ex=651b50b8&is=6519ff38&hm=4652ada8273adfc19f9c72ca47a3eac6a1b05dfc9013998a99fb2372a025f46f&",
]

zookiePics = [
"https://cdn.discordapp.com/attachments/1158181434662584320/1158182189981249546/PXL_20210818_214212828.jpg?ex=651b50b8&is=6519ff38&hm=4652ada8273adfc19f9c72ca47a3eac6a1b05dfc9013998a99fb2372a025f46f&",
]

0 comments on commit f990f32

Please sign in to comment.