nano

To use: [p]nano [word_count] For example: !nano 2000 Works with no place separator, period place separator, or comma place separator for word count.

Privateunrated

Content

29 lines
{=(COMMENT): You can edit this code if you like, but I won't provide support if you do. Comments are for those trying to learn tagscript.}

{=(COMMENT): cleanargs replaces periods (non-US) and commas (US) in word count entries if users enter them. Allows calcs to continue without breaking regardless of how word count is entered.}
{=(cleanargs):{m:round({replace(%2C,):{urlencode:{replace(.,):{args}}}})}}

{=(COMMENT): wordcount formats the word count provided in args to have commas as place separators. Used for final messages.}
{=(wordcount):{replace(st,):{replace(nd,):{replace(rd,):{replace(th,):{ord:{cleanargs}}}}}}}

{=(COMMENT): Basic math to calculate the words left to write.}
{=(words):{m:50000-{cleanargs}}}

{=(COMMENT): Calcs number of days left in month of November. If used in a month before Nov, defaults to 30.}
{=(days):{if({strf:%m}<11):30|{m:trunc({m:30-{strf:%d}})}}}

{=(COMMENT): Basic math to calculate the number of words per day with rounding.}
{=(result):{m:round({m:{words}/{days}})}}

{=(COMMENT): Message to send if the args are empty.}
{=(empty):{user(mention)}, please make sure to include your current word count, or I can't calculate how many words per day you need to write.

You can use `0` if you haven't started, yet.}

{=(COMMENT): Checks if number of words to write is 0. If so, sends a message congratulating them on winning NaNoWriMo. If not, displays a message with how many words they need to write to hit goal.}
{=(msg):{if({result}==0):πŸŽ‰ **CONGRATULATIONS ON WINNING NANO, {user(mention)}!** πŸŽ‰|{user(mention)}, there are **{days} days left** in NaNoWriMo, and you've written **{wordcount} words**. You should write **{result} words** per day to hit the 50,000 goal.

**KEEP GOING! YOU CAN DO IT!**}}

{=(COMMENT): Checks for empty args. If empty, displays empty message. If not empty, displays one of the messages above.}
{=(message):{if(=={args}):{empty}|{msg}}}

Embed

1 line
{"color": 3092790, "author": {"url": "https://nanowrimo.org/", "name": "NaNoWriMo", "icon_url": "https://i.imgur.com/FOwHiPr.png"}, "footer": {"text": "image courtesy of NaNoWriMo"}, "description": "{message}"}
Raw JSON
{
  "id": 1126758,
  "created_at": "2021-10-27T21:23:17.000Z",
  "tag_name": "nano",
  "nsfw": false,
  "owner_id": "508726665199747100",
  "uses": 54,
  "description": "To use:\n[p]nano [word_count]\n\nFor example:\n!nano 2000\n\nWorks with no place separator, period place separator, or comma place separator for word count.",
  "restricted": false,
  "shared": false,
  "deleted": false,
  "safe": "unrated",
  "hidden": false,
  "guild_id": "680999342475051064",
  "sharer": "508726665199747100",
  "content": "{=(COMMENT): You can edit this code if you like, but I won't provide support if you do. Comments are for those trying to learn tagscript.}\n\n{=(COMMENT): cleanargs replaces periods (non-US) and commas (US) in word count entries if users enter them. Allows calcs to continue without breaking regardless of how word count is entered.}\n{=(cleanargs):{m:round({replace(%2C,):{urlencode:{replace(.,):{args}}}})}}\n\n{=(COMMENT): wordcount formats the word count provided in args to have commas as place separators. Used for final messages.}\n{=(wordcount):{replace(st,):{replace(nd,):{replace(rd,):{replace(th,):{ord:{cleanargs}}}}}}}\n\n{=(COMMENT): Basic math to calculate the words left to write.}\n{=(words):{m:50000-{cleanargs}}}\n\n{=(COMMENT): Calcs number of days left in month of November. If used in a month before Nov, defaults to 30.}\n{=(days):{if({strf:%m}<11):30|{m:trunc({m:30-{strf:%d}})}}}\n\n{=(COMMENT): Basic math to calculate the number of words per day with rounding.}\n{=(result):{m:round({m:{words}/{days}})}}\n\n{=(COMMENT): Message to send if the args are empty.}\n{=(empty):{user(mention)}, please make sure to include your current word count, or I can't calculate how many words per day you need to write.\n\nYou can use `0` if you haven't started, yet.}\n\n{=(COMMENT): Checks if number of words to write is 0. If so, sends a message congratulating them on winning NaNoWriMo. If not, displays a message with how many words they need to write to hit goal.}\n{=(msg):{if({result}==0):πŸŽ‰ **CONGRATULATIONS ON WINNING NANO, {user(mention)}!** πŸŽ‰|{user(mention)}, there are **{days} days left** in NaNoWriMo, and you've written **{wordcount} words**. You should write **{result} words** per day to hit the 50,000 goal.\n\n**KEEP GOING! YOU CAN DO IT!**}}\n\n{=(COMMENT): Checks for empty args. If empty, displays empty message. If not empty, displays one of the messages above.}\n{=(message):{if(=={args}):{empty}|{msg}}}",
  "embed": "{\"color\": 3092790, \"author\": {\"url\": \"https://nanowrimo.org/\", \"name\": \"NaNoWriMo\", \"icon_url\": \"https://i.imgur.com/FOwHiPr.png\"}, \"footer\": {\"text\": \"image courtesy of NaNoWriMo\"}, \"description\": \"{message}\"}",
  "last_fetched": "2026-10-20T17:54:33.915Z"
}