From b6a4bdf46c2771a632d1c8bbeb0bd0e19ae9ad5d Mon Sep 17 00:00:00 2001 From: Marc Di Luzio Date: Fri, 9 Aug 2024 00:32:59 +0100 Subject: [PATCH] Set commands to be dm or guild only --- matchy.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/matchy.py b/matchy.py index c255620..547ac09 100755 --- a/matchy.py +++ b/matchy.py @@ -34,6 +34,7 @@ async def on_ready(): @bot.command() @commands.check(lambda ctx: ctx.message.author.id in config.OWNERS) +@commands.dm_only() async def sync(ctx: discord.ext.commands.context.Context): """Handle sync command""" # Sync the commands with the discord API @@ -46,6 +47,7 @@ async def sync(ctx: discord.ext.commands.context.Context): @bot.tree.command(description = "Match matchees into groups", guilds = list(g for g in guilds if g.id in config.SERVERS)) @app_commands.describe(per_group = "Matchees per group (default 3+)", post = "Post to channel") +@commands.guild_only() async def match(interaction: discord.Interaction, per_group: int = None, post: bool = None): """Match groups of channel members""" if not per_group: