lottery
Private
Content
63 lines{=(comment):Edit the following 5 blocks. Manager is the person who can run this command. If you want everyone to be able to host lotteries, then put {server(id)} in place of the id. lrole is the Lottery Role assigned to the entrants of the lottery. lping is the role to be pinged when starting the lottery and entrants are the entrants of the lottery. Time is the time for which the lottery will go on. As its currently 24h, Carl will remind you in 24h after running the lottery start cmd to end it. PLEASE PUT THE TIME IN HOURS. IT CAN BE 0.5h for 30 minutes.}
{=(manager):436238695868399617}
{=(lrole):1450212177574363348}
{=(time):24h}
{=(lping):884760594945810463}
{=(entrants):823904633944539196}
{=(comment):Making the tagscript of the tag. DO NOT MESS WITH THE BELOW PART IF YOU DON"T KNOW HOW TO USE TAGSCRIPT.}
{=():}
{override}
{{all({args}!=entrants|{args}!=entries):silent}}
{=(entrantsforcounting):{urlencode(+):{entrants}}}
{=(entrantsseperatedwithcommas):{replace(
,,):{entrants}}}
{=(charactertocount):%0A}
{=(arglength):{index($%&):{entrantsforcounting} $%&}}
{=(newarglength):{index($%&):{replace({charactertocount},. .):{entrantsforcounting}} $%&}}
{=(count1):{m:trunc({newarglength}-{arglength})}}
{=(count):{m:trunc({count1}+{if({count1}!=0):1|0})}}
{{if({1}==add):c:role add {2} {lrole}}}
{{if({1}==remove):c:role remove {2} {lrole}}}
{=(winner):{rand:{entrantsseperatedwithcommas}}}
{{if({1}==start):c:af silent {time} {user(mention)}: It has been {time} since the lottery has been started. Its time to end it! Do `!lottery entrants` and input it in the tag. After that, run `!lottery winner` to find the winner!}}
{=(dankcmd):{if({in({m:sgn({args(2+)})}):-1 0 1}==true):give|gift}}
{=(numberofentries):{all({dankcmd}==gift|{in({m:sgn({args(2)})}):-1 0 1}==false):1 }}
{{any({args}==entrants|{args}==entries):c:dump {lrole} %i}}
{{if({args}==end):c:role rall {lrole}}}
{=(timec):{m:trunc({replace(h,):{time}}*3600+{unix})}}
{=(stats):Here are the statistics for the lottery command!
Uses: {uses}
Current No. Of Entrants: {count}
Your ID: {user(id)}
You have entered the lottery?: {if({contains({lrole}):{user(roleids)}}==true):Yes|No}}
{=(Comment):Adding blacklists for errors}
{{all({1}==start|{args(2+)}==):blacklist(```lottery start <entry>
^^^^^^^
Entry fee is a mandatory input which is empty!```):{server(id)}}}
{{all({1}==add|{2}==):blacklist(```lottery add <user>
^^^^^^
User is a mandatory argument that is missing```):{server(id)}}}
{=(comment):Making the help embeds}
{{if({args}==guide):c:cembed {channel(id)} {"title":"Lottery Guide","description":"Step 1: Type `!lottery start <item>` in the channel the lottery has to be conducted it.\nStep 2: To add someone to the list, type `!lottery add <user>`.\nStep 3: *[optional]* To remove someone from the list, type `!lottery remove <user>`\nStep 4: After the lottery ends, Carl will remind you in the channel.\nStep 5: Do `!lottery entries` to get the User IDs of all the entrants and paste it in the tag.\nStep 6: Run `!lottery winner` to find the winner.\nStep 7: Run `!lottery end` to clear the lottery list and go to the [Dashboard](https://carl.gg) to clear the tag.\nYou are done!\nNote: All these steps are considering that you have imported the tag correctly. If any of the part isn't working, kindly recheck your tag.","color":7506394,"footer":{"text":"Use \"lottery help [command]\" for more info on a command."}}}}
{{if({args}==help guide):c:cembed {channel(id)} {"title":"lottery guide","description":"Shows the guide for the tag an how to run it.","color":7506394}}}
{{any({args}==help|{args}==):c:cembed {channel(id)} https://pastebin.com/SnQJmb3m}}
{{if({args}==help 2):c:cembed {channel(id)} https://pastebin.com/wTyrKUEZ}}
{{if({args}==help help):c:cembed {channel(id)} {"title":"lottery help [command]","description":"Shows help about a subcommand or the whole help command. ","color":7506394}}}
{{if({args}==help add):c:cembed {channel(id)} {"title":"lottery add <user>","description":"Adds the User to the Lottery List. Can be an ID or a mention while the latter is preferred. ","color":7506394}}}
{{if({args}==help start):c:cembed {channel(id)} {"title":"lottery start <prize>","description":"Starts the lottery with the prize as defined. ","color":7506394}}}
{{if({args}==help remove):c:cembed {channel(id)} {"title":"lottery remove <user>","description":"Removes the User to the Lottery List. Can be an ID or a mention while the latter is preferred. ","color":7506394}}}
{{any({args}==help entries|{args}==help entrants):c:cembed {channel(id)} {"title":"lottery {2}","description":"Shows the User IDs of the users in the lottery going on.","color":7506394}}}
{{if({args}==help end):c:cembed {channel(id)} {"title":"lottery end","description":"Ends the lottery and clears the lottery list.","color":7506394}}}
{{if({args}==help stats):c:cembed {channel(id)} {"title":"lottery stats","description":"Shows some boring stats about the lottery.","color":7506394}}}
{{if({args}==help winner):c:cembed {channel(id)} {"title":"lottery winner","description":"Declares the winner of the lottery.","color":7506394}}}
{=(comment):Pinging the role when starting the lottery.}
{if({1}==start):<@&{lping}>}
{override}
{=(comment):Making the variables for the embed in the embed builder}
{=(em.title):{any({1}==start|{1}==add|{1}==end|{1}==remove):Success!|{if({args}==winner):Congrats!|{if({args}==stats):Here are the boring stats.|{any({1}==entrants|{1}==entries):Success!}}}}}
{=(em.desc):{if({1}==start):A lottery has been started by {user} for {args(2+)} and it will end <t:{timec}:R>. To enter, type `pls {dankcmd} {numberofentries}{args(2+)} {user(mention)}`. The winner will be announced <t:{timec}:R> in {channel(mention)}|{if({1}==add):{2} has been added to the lottery!|{if({1}==remove):{2} has been removed from the lottery!|{any({1}==entrants|{1}==entries):Here are the User IDs of all the entrants until now. Check the list sent by me in another message.|{if({1}==end):Lottery has been ended and the lottery list has been cleared. You are requested to edit the tag on the [Dashboard](https://carl.gg "Dashboard")|{if({args}==winner):Congrats to <@{winner}> for winning the lottery! Kindly contact {user(mention)} to get your prize!|{if({args}==stats):{stats}}}}}}}}}
{{if({contains({manager}):{user(roleids)}}==false):blacklist(You are not authorized to run this command):{server(id)}}}Embed
1 line{"color": 7506394, "title": "{em.title}", "description": "{em.desc}"}Raw JSON
{
"id": 2467935,
"created_at": "2025-12-15T19:24:36.000Z",
"tag_name": "lottery",
"nsfw": false,
"owner_id": "278695690702422017",
"uses": 10,
"description": null,
"restricted": false,
"shared": false,
"deleted": false,
"safe": "",
"hidden": false,
"guild_id": "402936359754661888",
"sharer": "278695690702422017",
"content": "{=(comment):Edit the following 5 blocks. Manager is the person who can run this command. If you want everyone to be able to host lotteries, then put {server(id)} in place of the id. lrole is the Lottery Role assigned to the entrants of the lottery. lping is the role to be pinged when starting the lottery and entrants are the entrants of the lottery. Time is the time for which the lottery will go on. As its currently 24h, Carl will remind you in 24h after running the lottery start cmd to end it. PLEASE PUT THE TIME IN HOURS. IT CAN BE 0.5h for 30 minutes.}\n{=(manager):436238695868399617}\n{=(lrole):1450212177574363348}\n{=(time):24h}\n{=(lping):884760594945810463}\n{=(entrants):823904633944539196}\n\n{=(comment):Making the tagscript of the tag. DO NOT MESS WITH THE BELOW PART IF YOU DON\"T KNOW HOW TO USE TAGSCRIPT.}\n{=():}\n{override}\n{{all({args}!=entrants|{args}!=entries):silent}}\n{=(entrantsforcounting):{urlencode(+):{entrants}}}\n{=(entrantsseperatedwithcommas):{replace(\n,,):{entrants}}}\n{=(charactertocount):%0A}\n{=(arglength):{index($%&):{entrantsforcounting} $%&}}\n{=(newarglength):{index($%&):{replace({charactertocount},. .):{entrantsforcounting}} $%&}}\n{=(count1):{m:trunc({newarglength}-{arglength})}}\n{=(count):{m:trunc({count1}+{if({count1}!=0):1|0})}}\n{{if({1}==add):c:role add {2} {lrole}}}\n{{if({1}==remove):c:role remove {2} {lrole}}}\n{=(winner):{rand:{entrantsseperatedwithcommas}}}\n{{if({1}==start):c:af silent {time} {user(mention)}: It has been {time} since the lottery has been started. Its time to end it! Do `!lottery entrants` and input it in the tag. After that, run `!lottery winner` to find the winner!}}\n{=(dankcmd):{if({in({m:sgn({args(2+)})}):-1 0 1}==true):give|gift}}\n{=(numberofentries):{all({dankcmd}==gift|{in({m:sgn({args(2)})}):-1 0 1}==false):1 }}\n{{any({args}==entrants|{args}==entries):c:dump {lrole} %i}}\n{{if({args}==end):c:role rall {lrole}}}\n{=(timec):{m:trunc({replace(h,):{time}}*3600+{unix})}}\n{=(stats):Here are the statistics for the lottery command!\nUses: {uses}\nCurrent No. Of Entrants: {count}\nYour ID: {user(id)}\nYou have entered the lottery?: {if({contains({lrole}):{user(roleids)}}==true):Yes|No}}\n\n{=(Comment):Adding blacklists for errors}\n{{all({1}==start|{args(2+)}==):blacklist(```lottery start <entry>\n ^^^^^^^\nEntry fee is a mandatory input which is empty!```):{server(id)}}}\n{{all({1}==add|{2}==):blacklist(```lottery add <user>\n ^^^^^^\nUser is a mandatory argument that is missing```):{server(id)}}}\n\n{=(comment):Making the help embeds}\n{{if({args}==guide):c:cembed {channel(id)} {\"title\":\"Lottery Guide\",\"description\":\"Step 1: Type `!lottery start <item>` in the channel the lottery has to be conducted it.\\nStep 2: To add someone to the list, type `!lottery add <user>`.\\nStep 3: *[optional]* To remove someone from the list, type `!lottery remove <user>`\\nStep 4: After the lottery ends, Carl will remind you in the channel.\\nStep 5: Do `!lottery entries` to get the User IDs of all the entrants and paste it in the tag.\\nStep 6: Run `!lottery winner` to find the winner.\\nStep 7: Run `!lottery end` to clear the lottery list and go to the [Dashboard](https://carl.gg) to clear the tag.\\nYou are done!\\nNote: All these steps are considering that you have imported the tag correctly. If any of the part isn't working, kindly recheck your tag.\",\"color\":7506394,\"footer\":{\"text\":\"Use \\\"lottery help [command]\\\" for more info on a command.\"}}}}\n{{if({args}==help guide):c:cembed {channel(id)} {\"title\":\"lottery guide\",\"description\":\"Shows the guide for the tag an how to run it.\",\"color\":7506394}}}\n{{any({args}==help|{args}==):c:cembed {channel(id)} https://pastebin.com/SnQJmb3m}}\n{{if({args}==help 2):c:cembed {channel(id)} https://pastebin.com/wTyrKUEZ}}\n{{if({args}==help help):c:cembed {channel(id)} {\"title\":\"lottery help [command]\",\"description\":\"Shows help about a subcommand or the whole help command. \",\"color\":7506394}}}\n{{if({args}==help add):c:cembed {channel(id)} {\"title\":\"lottery add <user>\",\"description\":\"Adds the User to the Lottery List. Can be an ID or a mention while the latter is preferred. \",\"color\":7506394}}}\n{{if({args}==help start):c:cembed {channel(id)} {\"title\":\"lottery start <prize>\",\"description\":\"Starts the lottery with the prize as defined. \",\"color\":7506394}}}\n{{if({args}==help remove):c:cembed {channel(id)} {\"title\":\"lottery remove <user>\",\"description\":\"Removes the User to the Lottery List. Can be an ID or a mention while the latter is preferred. \",\"color\":7506394}}}\n{{any({args}==help entries|{args}==help entrants):c:cembed {channel(id)} {\"title\":\"lottery {2}\",\"description\":\"Shows the User IDs of the users in the lottery going on.\",\"color\":7506394}}}\n{{if({args}==help end):c:cembed {channel(id)} {\"title\":\"lottery end\",\"description\":\"Ends the lottery and clears the lottery list.\",\"color\":7506394}}}\n{{if({args}==help stats):c:cembed {channel(id)} {\"title\":\"lottery stats\",\"description\":\"Shows some boring stats about the lottery.\",\"color\":7506394}}}\n{{if({args}==help winner):c:cembed {channel(id)} {\"title\":\"lottery winner\",\"description\":\"Declares the winner of the lottery.\",\"color\":7506394}}}\n\n{=(comment):Pinging the role when starting the lottery.}\n{if({1}==start):<@&{lping}>}\n{override}\n{=(comment):Making the variables for the embed in the embed builder}\n{=(em.title):{any({1}==start|{1}==add|{1}==end|{1}==remove):Success!|{if({args}==winner):Congrats!|{if({args}==stats):Here are the boring stats.|{any({1}==entrants|{1}==entries):Success!}}}}}\n{=(em.desc):{if({1}==start):A lottery has been started by {user} for {args(2+)} and it will end <t:{timec}:R>. To enter, type `pls {dankcmd} {numberofentries}{args(2+)} {user(mention)}`. The winner will be announced <t:{timec}:R> in {channel(mention)}|{if({1}==add):{2} has been added to the lottery!|{if({1}==remove):{2} has been removed from the lottery!|{any({1}==entrants|{1}==entries):Here are the User IDs of all the entrants until now. Check the list sent by me in another message.|{if({1}==end):Lottery has been ended and the lottery list has been cleared. You are requested to edit the tag on the [Dashboard](https://carl.gg \"Dashboard\")|{if({args}==winner):Congrats to <@{winner}> for winning the lottery! Kindly contact {user(mention)} to get your prize!|{if({args}==stats):{stats}}}}}}}}}\n{{if({contains({manager}):{user(roleids)}}==false):blacklist(You are not authorized to run this command):{server(id)}}}",
"embed": "{\"color\": 7506394, \"title\": \"{em.title}\", \"description\": \"{em.desc}\"}",
"last_fetched": "2026-10-21T23:54:23.292Z"
}