Ask coding questions

← Back to all posts
How to make a "Countdown" Command on a Discord bot?
ntomoon (0)

How do you make a countdown then a bot mentioning a role after the countdown ends? I'm using Python. (I NEED A PROPER ANSWER THIS TIME!!)

ch1ck3n (2088)

im not sure but this might work

import time

async def countdown(ctx, arg):
    t = arg
    while t:
        mins, secs = divmod(t, 60)
        timer = '{:02d}:{:02d}'.format(mins, secs)
        t -= 1

$countdown 5

ch1ck3n (2088)

wdym proper answer

lmao disappointed you