Skip to content

Commit

Permalink
feat(exts/fun): Allow user install on some of the commands
Browse files Browse the repository at this point in the history
  • Loading branch information
null2264 committed Sep 14, 2024
1 parent e705cc8 commit 122c7f8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/zibot/exts/fun/fun.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ async def meme(self, ctx: Context):

await ctx.try_reply(embed=e)

@app_commands.allowed_contexts(guilds=True, dms=True, private_channels=True)
@app_commands.allowed_installs(guilds=True, users=True)
@app_commands.choices(args=[Choice(name=i, value=i) for i in get_args(FINDSEED_MODES)])
@app_commands.rename(args="mode")
@cmds.command(
Expand Down Expand Up @@ -386,6 +388,8 @@ async def roll(self, ctx, *args):
]
return await ctx.try_reply("You rolled {}".format(", ".join(results)))

@app_commands.allowed_contexts(guilds=True, dms=True, private_channels=True)
@app_commands.allowed_installs(guilds=True, users=True)
@cmds.command(
name=_("clap"),
aliases=("👏",),
Expand All @@ -397,6 +401,8 @@ async def roll(self, ctx, *args):
async def clap(self, ctx, *, text: str = ""):
return await ctx.try_reply(text.replace(" ", " 👏 ") or " 👏 ")

@app_commands.allowed_contexts(guilds=True, dms=True, private_channels=True)
@app_commands.allowed_installs(guilds=True, users=True)
@cmds.command(
name=_("barter"),
description=_("barter-desc"),
Expand Down Expand Up @@ -460,6 +466,8 @@ async def lootTableSuggestion(self, inter, choice):
rps = (("Before Nerf", "before"), ("After Nerfed", "nerfed"))
return [app_commands.Choice(name=i[0], value=i[1]) for i in rps]

@app_commands.allowed_contexts(guilds=True, dms=True, private_channels=True)
@app_commands.allowed_installs(guilds=True, users=True)
@cmds.command(
name=_("findblock"),
description=_("findblock-desc"),
Expand Down

0 comments on commit 122c7f8

Please sign in to comment.