NobleWolf42 / Stormageddon-Bot

Stormageddon is a Discord Bot built with discord.js & uses Command Handler from discordjs.guide If you would like to help in the development of this bot, the discord is https://discord.gg/tgJtK7f.
MIT License
2 stars 1 forks source link

!afk (amount) command #20

Open JLoganMilliron opened 4 years ago

JLoganMilliron commented 4 years ago

Add a command !afk (amount in minutes)

This results in the author of said message being kept track of by system. If another user @'s them, the time they left as well as the amount will be displayed.

NobleWolf42 commented 4 years ago

I would say just have the bot caculate an endtime in GMT and use this as the core of the command.

JLoganMilliron commented 4 years ago

While i considered that, it seems rather inefficient. In either case the majority of users will simply type into google either what is X time in GMT or what is this time + that time. Displaying the amount and leaving it to the user that way seemed like less code and likely faster for the majority of people who can handle adding 2+3 or 13 + 41 in their heads.

NobleWolf42 commented 4 years ago

You misunderstatnd, I meant to have the user input amount in minuets, but the bot caculates it in gmt in the back end, as that is easier than having it run a loop every minuet to remove 1 from the counter.

JLoganMilliron commented 4 years ago

I honestly, think you have a very different take on what this command does than I do. Ihonestly don't even know what loop or counter you are thinking of. I was thinking of this as a very simple command, where if the user who calls !afk (amount), whenever they are @'d, it would return what time they left at, and the amount they stated, with a !back command to return. More like adding their name to a maped list of ID > Amount, that is checked every message.

NobleWolf42 commented 4 months ago

can be done using a collection