const DISCORD_LINK = "please join our discord (http://www.esmbot.com/join) and let us know in a support channel"; const ERROR_PERSISTS = `If this error persists, ${DISCORD_LINK}`; let self = module.exports = { format: (userObject, template) => { let tag = ""; let message = ""; if (typeof userObject === "string") { tag = userObject; } else { tag = userObject.toString(); } if (self.hasOwnProperty(template)) { return `${tag}, ${self[template]}`; } else { return `${tag}, ${self.GENERIC_ERROR}`; } }, DISCORD_LINK: DISCORD_LINK, COMMUNITY_IDS_RAN_OUT: `Hmm... We ran into an issue registering your guild with ESMBot. ${DISCORD_LINK}`, PROCESS_COMMAND: `An error occurred while processing your command. Please try again.\n${ERROR_PERSISTS}`, ERROR_IS_COMMAND_ALLOWED_HERE: `I ran into an issue checking on this command. Please try again.\n${ERROR_PERSISTS}`, FAILED_IS_COMMAND_ALLOWED_HERE: `I wasn't able to confirm if this command is allowed. ${DISCORD_LINK}`, NO_PERMS: `You do not have permission to use this command`, DIRECT_MESSAGE_ONLY: `This community does not allow this command in text channels. *Hint: Direct message me this command*`, MISSING_WEB_INFO: `This command doesn't allow nor does it have permissions. ${DISCORD_LINK}`, COMMAND_NOT_ALLOWED: `You are not allowed to run this command on other communities`, GENERIC_ERROR: `Hmm... An error occured. Please try again later.\n${ERROR_PERSISTS}`, NULL_USER: `Discord pls... I can't access your user, Discord API might be having issues. Please try again later.`, GUILD_UNAVAILABLE: `Uh oh, I can't seem to access your guild. It appears Discord API is having some issues, please try again later`, FAILED_TO_FIND_COMMUNITY: `I didn't find the specified community. Please try again.\n${ERROR_PERSISTS}`, INVALID_COMMUNITY: `I didn't find the specified community. Please double check your spelling and try again`, MESSAGE_TOO_LONG: `The message you provided is too long for Discord to send. Please shorten the message to **less than 1750 characters** and try again`, UHH_UHH_UHH: `You aren't allowed to do that.\nhttp://gph.is/15wY87J`, USER_NOT_FOUND: `I've never seen this user in my life`, USER_NOT_REGISTERED: `This user has not registered yet. Let them know they can register by running \`!register\``, TERRITORY_INFO_NOT_FOUND: `I failed to find territory information. This is a bug, ${DISCORD_LINK}`, COMMAND_DISABLED: "This community has disabled this command for their servers", COMMAND_REQUIRES_REGISTRATION: `You need to be registered with me before you can use that command. Visit https://www.esmbot.com/register to get started`, GUILD_NOT_FOUND: `It looks like I don't have access to that Discord Community anymore.\nIf you believe this is a mistake, ${DISCORD_LINK}`, PLAYER_MODE_ENABLED: "This command is not available in Player Mode", UNABLE_TO_SEND_MESSAGE: `We were unable to process your request. Please try again later.\n${ERROR_PERSISTS}` };