text: const Reply = require('../../utilities/Reply');
  const { Send } = require('../../utilities/Send');
  const UtilityFunctions = require('../../utilities/UtilityFunctions');
  
  module.exports = {
  	name: 'movespecial',
  	description: 'Move in a non-standard way that will be processed by the GM manually.',
  	details: 'DM only.',
      related: ["move", "moveinstant", "do"],
  	format: "!movespecial <how you want to move and where>",
  	examples: [
  		"!movespecial follow batman", 
  		"!movespecial crawl into the secret passageway",
  		"!movespecial if I successfully dab then get the hell out of there and go to the livingroom, otherwise stay here."
  	],
  	dmonly: true,
  	common: true,
  	execute(client, message, args, settings) {
  		
  		let player = UtilityFunctions.GetPlayerFromDM(client, message);
  		if (!player || !player.username) return;
  
  		
  		if (settings.phase == null) 
  			return Reply.Aborted(message, "No game is currently in progress.")
  		
  		if (player.forceMoved) 
  			return Send(message, ":lock: A GM has already processed your movement manually. If you wish to change it, please consult your GM.");
  		
  		let returnMessage = "";
  
  		const action = args.join(" ");
  
  		if (action.length == 0)
  			return Reply.InvalidInput(message, "What? Please explain your movespeical command.");
  
  		if (player.moveSpecial) {
  			returnMessage += `:arrow_heading_down: Your previous \`!movespecial\` command: *${player.moveSpecial}* has been overwritten.\n`
  			player.move = null;
  		}
  
  		player.moveSpecial = action;
  		if (player.move) {
  			returnMessage += `:arrow_heading_down: Your previous \`!move\` command: **${player.move}** has been overwritten.\n`
  			player.move = null;
  		}
  
  		returnMessage += ":white_check_mark: Movespecial sent. The GM will process this action manually."
  		let logMessage = `**${player.username}**: ${returnMessage}`;
  		client.sql.setPlayer(message, player, logMessage, settings);
  
  		const displayName = `${player.character.toUpperCase()} [${player.username.toUpperCase()}]`;
  		let actionLogMessage = ":arrow_right::sparkles: __MOVESPECIAL__ " + displayName + ": `" + action + "`";
  		UtilityFunctions.PostInActionLog(client, message, settings, actionLogMessage);
  		UtilityFunctions.ReturnMessageAndPlayerEmbed(client, message, returnMessage, player, settings, {playerView: true});
  	}
  };