def command_for_self_exclude_error(client): input = { **default_command, "pick_list": ["<@1234|name>"], "weight_list": [1], "self_exclude": True, } command = create_and_return_command(**input) yield command Command.delete_command(command)
def command_with_no_active_users(client): input = { **default_command, "pick_list": ["<@4321|name>"], "weight_list": [1], "only_active_users": True, } command = create_and_return_command(**input) yield command Command.delete_command(command)
def delete_command_processor( *, channel_id: str, command_to_delete: str, ) -> dict[str, any]: command = Command.find_one_by_name_and_chanel(command_to_delete, channel_id) Command.delete_command(command) message_content = f"Command {command_to_delete} successfully deleted." return { "message": Message( content=message_content, status=MessageStatus.INFO, visibility=MessageVisibility.NORMAL, ) }
def basic_command(client): command = create_and_return_command(**default_command) yield command Command.delete_command(command)