Discord Markdown Countdown generator
Gives a Discord compatible markdown code that will show a live countdown for X seconds in the future.
Returns: Plain Text
Calling Method(s): GET, ,
Coded in: Python
Utility Code:
import time, sys, re
if __name__ == "__main__":
#ADMIN EDIT - 08/27/2026: Added Usage printout for when user doesn't give arguments. Started the print-out with "Usage:", which flags server to force-send output as text instead of any other author-configured format.
if len(sys.argv) == 1:
print("Usage: https://fech.space/dmdcd/[number/seconds]")
else:
#ADMIN EDIT - 08/27/2026: Check if argument is digit before putting into variable, safety check to prevent script crash.
if sys.argv[1].isdigit():
user_input = re.sub("[^0-9]", "", sys.argv[1])
future_unix_timestamp = int(time.time()) + int(user_input)
print(f"<t:{future_unix_timestamp}:R>")
else:
print(f"Error: {sys.argv[1]} is not a number.")
#ADMIN EDIT - 08/27/2026: Changed "Invalid input:" to "Error:", which flags server to force-send output as text instead of any other author-configured format.
Give Feedback
Community's Feedback on Utility
Utility Credits and Resources
(no credits mentioned for this utility)