@@ -151,6 +151,25 @@ async def disable(self, interaction: discord.Interaction["BallsDexBot"]):
151151 f"spawning channel set. Please configure one with { config_cmd } ."
152152 )
153153
154+ @app_commands .command ()
155+ @app_commands .checks .has_permissions (manage_guild = True )
156+ @app_commands .checks .bot_has_permissions (send_messages = True )
157+ async def toggledrop (self , interaction : discord .Interaction ["BallsDexBot" ]):
158+ """
159+ Allow or disallow players from using the drop command in this server.
160+ """
161+ config , created = await GuildConfig .objects .aget_or_create (guild_id = interaction .guild_id )
162+ config .manual_drop_enabled = not config .manual_drop_enabled # type: ignore
163+ await config .asave ()
164+ if config .manual_drop_enabled :
165+ await interaction .response .send_message (
166+ f"Players can now use the drop command to manually spawn { settings .plural_collectible_name } ."
167+ )
168+ else :
169+ await interaction .response .send_message (
170+ f"Players can no longer use the drop command to manually spawn { settings .plural_collectible_name } ."
171+ )
172+
154173 @app_commands .command ()
155174 @app_commands .checks .has_permissions (manage_guild = True )
156175 async def status (self , interaction : discord .Interaction ["BallsDexBot" ]):
@@ -181,6 +200,7 @@ async def status(self, interaction: discord.Interaction["BallsDexBot"]):
181200
182201 embed .add_field (name = "Channel" , value = channel .mention , inline = True )
183202 embed .add_field (name = "Status" , value = "Enabled" if config .enabled else "Disabled" , inline = True )
203+ embed .add_field (name = "Drop command" , value = "Enabled" if config .manual_drop_enabled else "Disabled" , inline = True )
184204
185205 def tick (granted : bool ) -> str :
186206 return "\N{WHITE HEAVY CHECK MARK} " if granted else "\N{CROSS MARK} "
0 commit comments