numtest
A snippet that shows how you would test if a given input {args(1)} is a number or not. You can use this as the content of a variable, replacing "a whole number" or "a decimal number" with {args(1)} so that the variable is equal to the given input if the input is a number. You can replace "not a number" with error, or 0, or -1, or whatever you want to use to indicate the input was not a number for the rest of your code.
Privateunrated
Content
1 line{if({args(1)}=={m:trunc({args(1)}/1)}):a whole number|{if({args(1)}=={m:{args(1)}/1}):a decimal number|not a number}}Raw JSON
{
"id": 112924,
"created_at": "2020-01-25T23:10:23.000Z",
"tag_name": "numtest",
"nsfw": false,
"owner_id": "129419437911572480",
"uses": 0,
"description": "A snippet that shows how you would test if a given input {args(1)} is a number or not. You can use this as the content of a variable, replacing \"a whole number\" or \"a decimal number\" with {args(1)} so that the variable is equal to the given input if the input is a number. You can replace \"not a number\" with error, or 0, or -1, or whatever you want to use to indicate the input was not a number for the rest of your code.",
"restricted": false,
"shared": false,
"deleted": false,
"safe": "unrated",
"hidden": false,
"guild_id": "518252334975811604",
"sharer": "129419437911572480",
"content": "{if({args(1)}=={m:trunc({args(1)}/1)}):a whole number|{if({args(1)}=={m:{args(1)}/1}):a decimal number|not a number}}",
"embed": "{}",
"last_fetched": "2026-10-20T20:53:42.897Z"
}