muhammadmuzzammil1998 / BitcoinBot

A discord bot to check Bitcoin Price… yeah… just that…
https://muhammadmuzzammil1998.github.io/BitcoinBot/
MIT License
4 stars 0 forks source link

Idea #5

Open mehdi9000 opened 6 years ago

mehdi9000 commented 6 years ago

Is it possible to invoke BitcoinBot at custom timed intervals in chat? I.E. timed commands to show BTC price the way >btc USD invoked say from 1m-4h? Would be a nice feature I think.

muhammadmuzzammil1998 commented 6 years ago

Yeah that would be a cool feature to have. I will definitely look into that. Thanks!

mehdi9000 commented 6 years ago

Also I thought of another cool feature. Text to speech. so when

Bitcoin Price Current Bitcoin per USD price: USD /tts 9293.99

with custom timer. It's so simple to do, and helps you get alerts if BTC is doing something badwhen you're sleeping

muhammadmuzzammil1998 commented 6 years ago

Yeah sure...

mehdi9000 commented 6 years ago

It's actually not a bad idea because I don't think there's any other bot that does that. I wouldn't make it a default, but an option perhaps. It's like a line or two right? But timed messages that show that at custom intervals is pretty dope. Then getting an alert every X minutes/hours/etc. makes it even robust but also sticks to keeping it simple the way you intended.

Just a suggestion, but I think you'll get more servers adding it/exposure since no other one does it because no one else thought of it :D

muhammadmuzzammil1998 commented 6 years ago

Yes, @mastermood I do think that this is a great idea and I wasn't being sarcastic. If that hurt your feelings, I am sorry. I was kinda busy when I read the notification so I replied a short answer.

I haven't started working on it because of my exams and rest assured that I will code that tts command for BitcoinBot.

What do you think? For normal tts reply, >btc USD tts is better or >btc USD -t or something else?

Thank you for supporting the Project.

mehdi9000 commented 6 years ago

I'm not sure on what flag works. I thought it usually works as /tts >btc USD and the output hides the /tts flag.

Btw, I've noticed a slight delay of the price of about 3-5 minutes when it outputs the price. Is that due to API limitations. I hosted the scripts on my own server for the bot, but I got the same delay.

Oh - one other suggestion: Consider adding option to choose either GDAX or Bitfinex API for pulling data as an option. Why? Because overall market follow Bitfinex and/or GDAX. They are both good, but the Bitfinex prices are what generally impact all the other markets.

muhammadmuzzammil1998 commented 6 years ago

Well, the delay is from coinbase and there is nothing I can do about it. It could be their "cool down" mechanism to prevent spam requests.

GDAX and Bitfinex, while both are good services, they lack a variety of real-currencies options to choose from in getting the price. For instance, bitfinex does not even support INR (Indian Rupee), it reports an error of {"message":"Unknown symbol"}.

mehdi9000 commented 6 years ago

IMO, the best is USD since most websites do analyses and metrics on that & USD is universal.

mehdi9000 commented 6 years ago

Did you see what @nabeelomer wrote? He said "To remove the delay load the prices at a fixed interval in an async manner in a go routine and use channels to share the value with the main go routine."

muhammadmuzzammil1998 commented 6 years ago

Yeah, I got the email. I talked to him about this matter. But the thing is, if I do that, it won't be "real-time" and "current" as we all know that bitcoin's rate fluctuate. So, he deleted his comment.

mehdi9000 commented 6 years ago

unknown

I think the sidebar is better when the order is like this:

"Playing $9520 | 10 ms | >btc help"

Because the price gets cuts off if it's the middle entry on some screen resolutions on Discord/phones.

muhammadmuzzammil1998 commented 6 years ago

Please open another issue for this.

Thanks.