guess

Private

Content

90 lines
{=(comment):You must create 2 roles to be used with this number guessing game. 
Follow these steps:

1. 	Do:

		@Carl-bot#1536 role create ­ 000000 false false
			
	To create a role that looks like it has no name (a "Blank" role), with the default off-white role color.
	Using the command will mean this role has NO permissions (on purpose)
		
	Move this role up in the role hierarchy to under Carl-bot's highest role, and above all member and color roles.		
	
2.	Do:
		@Carl-bot#1536 role create GuessingGame 123456 false false
			
	To create the role the bot uses to keep track of it's hidden number.
		
	Move this role up in the role hierarchy to be under the "Blank" role you created earlier (also above all member and color roles). 
		
	The hierarchy should look like:
			
		Carl-bot's role somewhere up here
		...
		The "Blank" role
		GuessingGame
		...
		Other member and color roles down here. 
	
	Since the blank role has no color, the GuessingGame role's color will "bleed up" and become the user's color while they play..
	If GuessingGame is not above other roles that would give users colors, the game will not function correctly.
		
		
3.	Now that the two roles are set up, you must add them as ranks in Carl-bot's rank system. 
	This will allow users to join and leave the game as they please, so they can return to their regular color when they desire.
	
	Do:
	
		@Carl-bot#1536 addrank ­ GuessingGame
		
	
4.	Copy the role ID for the GuessingGame role (or whatever you named that 2nd role), and 
	paste it into the "game.role" variable below this comment block, after the : and before the right curly bracket.
	
	The role's ID should be listed in the footer of the embed Carl-bot output when it was created. 
	If you are still confused, check out this guide: https://discordhelp.net/role-id
	(but only paste the numbers, not the <@& or > symbols)
		
		
5.	Setup is complete! If you want to change the name of the "GuessingGame" role, you can do that now.
	Don't change the name of the blank role.
	Add a delete block to the tag to make players' guesses hidden from each other.
}

{=(game.role):892279722652868649}

{=(comment):if your server uses a prefix other than ! for Carl-bot, change it here so messages that are output will be syntactically correct for your server}
{=(prefix):!}
{=(tag.name):guess}

{=(comment):this is the upper limit for the random number Carl-bot uses. by default it is 100. keep it reasonable. might error if set higher than 16777217, so please don't do that}
{=(limit):100}

{=(comment):no more settings to change, best not to touch anything below}
{=():}{override}{silence}
{=(join):+.joined}
{=(leave):-.left}

{=(L1):{lower:{1}}}
{=(jlchk):{contains({L1}):join leave}}

{{if({jlchk}==true):c:rank custom {{L1}(1):.}­ {{L1}(1):.}{game.role}}}
{break({jlchk}==true):{user} has {{L1}(2):.} the game.}

{break({jlchk}{contains({game.role}):{user(roleids)}}==falsefalse):You must join the game to play. Do `{prefix}{tag.name} join` to join the game. To stop playing, do `{prefix}{tag.name} leave`.}

{=(hex):#:1,2,3,4,5,6,7,8,9,0,A,B,C,D,E,F}
{=(ran.hex):#{{hex}}{{hex}}{{hex}}{{hex}}{{hex}}{{hex}}}
{=(uc):{user(color)}}

{=(rng):{range({uc}):1-{limit}}}
{=(outcome.error):You must follow the tag with a number between 1 and {limit}. To stop playing, do `{prefix}{tag.name} leave`.}
{=(outcome.-1):Good guess {user}, but it's lower.}
{=(outcome.0):WOW {upper:{user}} GOT IT RIGHT!! Ok, I'm thinking of a new number between 1 and {limit}.}
{=(outcome.1):Nice try {user}, but it's higher.}

{=(relation):{m:sgn({rng}-{1})}}
{=(relation):{if({contains({relation}):-1 0 1}==true):{relation}|error}}
{outcome.{relation}}
{=(ran.hex):{if({ran.hex}==#000000):#888888|{ran.hex}}}
{{if({relation}==0):c:role color {game.role} {ran.hex}}}
Raw JSON
{
  "id": 1082044,
  "created_at": "2021-09-28T05:16:10.000Z",
  "tag_name": "guess",
  "nsfw": false,
  "owner_id": "690612199277723659",
  "uses": 102,
  "description": null,
  "restricted": false,
  "shared": false,
  "deleted": false,
  "safe": "",
  "hidden": false,
  "guild_id": "848230687026315285",
  "sharer": "747403406154399765",
  "content": "{=(comment):You must create 2 roles to be used with this number guessing game. \nFollow these steps:\n\n1. \tDo:\n\n\t\t@Carl-bot#1536 role create ­ 000000 false false\n\t\t\t\n\tTo create a role that looks like it has no name (a \"Blank\" role), with the default off-white role color.\n\tUsing the command will mean this role has NO permissions (on purpose)\n\t\t\n\tMove this role up in the role hierarchy to under Carl-bot's highest role, and above all member and color roles.\t\t\n\t\n2.\tDo:\n\t\t@Carl-bot#1536 role create GuessingGame 123456 false false\n\t\t\t\n\tTo create the role the bot uses to keep track of it's hidden number.\n\t\t\n\tMove this role up in the role hierarchy to be under the \"Blank\" role you created earlier (also above all member and color roles). \n\t\t\n\tThe hierarchy should look like:\n\t\t\t\n\t\tCarl-bot's role somewhere up here\n\t\t...\n\t\tThe \"Blank\" role\n\t\tGuessingGame\n\t\t...\n\t\tOther member and color roles down here. \n\t\n\tSince the blank role has no color, the GuessingGame role's color will \"bleed up\" and become the user's color while they play..\n\tIf GuessingGame is not above other roles that would give users colors, the game will not function correctly.\n\t\t\n\t\t\n3.\tNow that the two roles are set up, you must add them as ranks in Carl-bot's rank system. \n\tThis will allow users to join and leave the game as they please, so they can return to their regular color when they desire.\n\t\n\tDo:\n\t\n\t\t@Carl-bot#1536 addrank ­ GuessingGame\n\t\t\n\t\n4.\tCopy the role ID for the GuessingGame role (or whatever you named that 2nd role), and \n\tpaste it into the \"game.role\" variable below this comment block, after the : and before the right curly bracket.\n\t\n\tThe role's ID should be listed in the footer of the embed Carl-bot output when it was created. \n\tIf you are still confused, check out this guide: https://discordhelp.net/role-id\n\t(but only paste the numbers, not the <@& or > symbols)\n\t\t\n\t\t\n5.\tSetup is complete! If you want to change the name of the \"GuessingGame\" role, you can do that now.\n\tDon't change the name of the blank role.\n\tAdd a delete block to the tag to make players' guesses hidden from each other.\n}\n\n{=(game.role):892279722652868649}\n\n{=(comment):if your server uses a prefix other than ! for Carl-bot, change it here so messages that are output will be syntactically correct for your server}\n{=(prefix):!}\n{=(tag.name):guess}\n\n{=(comment):this is the upper limit for the random number Carl-bot uses. by default it is 100. keep it reasonable. might error if set higher than 16777217, so please don't do that}\n{=(limit):100}\n\n{=(comment):no more settings to change, best not to touch anything below}\n{=():}{override}{silence}\n{=(join):+.joined}\n{=(leave):-.left}\n\n{=(L1):{lower:{1}}}\n{=(jlchk):{contains({L1}):join leave}}\n\n{{if({jlchk}==true):c:rank custom {{L1}(1):.}­ {{L1}(1):.}{game.role}}}\n{break({jlchk}==true):{user} has {{L1}(2):.} the game.}\n\n{break({jlchk}{contains({game.role}):{user(roleids)}}==falsefalse):You must join the game to play. Do `{prefix}{tag.name} join` to join the game. To stop playing, do `{prefix}{tag.name} leave`.}\n\n{=(hex):#:1,2,3,4,5,6,7,8,9,0,A,B,C,D,E,F}\n{=(ran.hex):#{{hex}}{{hex}}{{hex}}{{hex}}{{hex}}{{hex}}}\n{=(uc):{user(color)}}\n\n{=(rng):{range({uc}):1-{limit}}}\n{=(outcome.error):You must follow the tag with a number between 1 and {limit}. To stop playing, do `{prefix}{tag.name} leave`.}\n{=(outcome.-1):Good guess {user}, but it's lower.}\n{=(outcome.0):WOW {upper:{user}} GOT IT RIGHT!! Ok, I'm thinking of a new number between 1 and {limit}.}\n{=(outcome.1):Nice try {user}, but it's higher.}\n\n{=(relation):{m:sgn({rng}-{1})}}\n{=(relation):{if({contains({relation}):-1 0 1}==true):{relation}|error}}\n{outcome.{relation}}\n{=(ran.hex):{if({ran.hex}==#000000):#888888|{ran.hex}}}\n{{if({relation}==0):c:role color {game.role} {ran.hex}}}",
  "embed": "{}",
  "last_fetched": "2026-10-20T17:42:30.173Z"
}