[UtopMod] Price task add and destroy

View this thread on: d.buzz | hive.blog | peakd.com | ecency.com
·@tolgahanuzun·
0.000 HBD
[UtopMod] Price task add and destroy
First, I made radical changes in the project. I added 3 new libraries in the project. I did this to DB migrate and to check more. This was necessary to provide a better working environment while adding new features.

![1.png](https://res.cloudinary.com/hpiynhbhq/image/upload/v1519488674/zwryxsrtadtx13zkz219.png)


PR link: https://github.com/tolgahanuzun/Utopmod/pull/2

## New Feature

I added a command that follows Steem-dollar exchange rate. This task warns you when the desired threshold value is reached.

### Price task

This feature is meant to generate profits at high rates. It gives a signal according to a threshold value that you create.

- You need to log in to the telegram bot. (/register username)

- Make a threshold value. Like $ 5. (/price_task 5)

- You can create only 1 task.

- If you can delete the task. (/price_destroy)

![2.png](https://res.cloudinary.com/hpiynhbhq/image/upload/v1519488692/bbxd8gi5qm3r47ujodcs.png)


- The bot checks a market value every 10 minutes. If it is above the threshold, it will send you a message.

![3.png](https://res.cloudinary.com/hpiynhbhq/image/upload/v1519488699/obaea3xv0cvrgip9zsbu.png)


It's an idea I got from friends in Discord. I also think that it will be helpful in myself.

## Code

- New libraries have been added for database control. Provides more specific control.

![4.png](https://res.cloudinary.com/hpiynhbhq/image/upload/v1519488709/eig1slhso3nwdr80hx8p.png)

![5.png](https://res.cloudinary.com/hpiynhbhq/image/upload/v1519488715/onl4kdysustw9jwiwxff.png)

![6.png](https://res.cloudinary.com/hpiynhbhq/image/upload/v1519488721/xsadhwmqrf2q1zz0ia6i.png)

- Database control now exists. (migrate) Added new table. This tabloda has price tasks.

![7.png](https://res.cloudinary.com/hpiynhbhq/image/upload/v1519488730/kihf5nkdhrhkfipldskn.png)


- Two commands have been added to the telegram bot.

![8.png](https://res.cloudinary.com/hpiynhbhq/image/upload/v1519488741/ibfk1bkpcvjl7vkrrgth.png)


- price_task : Price allows you to set a threshold value..

![9.png](https://res.cloudinary.com/hpiynhbhq/image/upload/v1519488752/xlw8tm9zhihvptcfpnyc.png)


- price_destroy: It will delete the task. (if like)

![10.png](https://res.cloudinary.com/hpiynhbhq/image/upload/v1519488757/lzkpligjj9ahn4vhecbz.png)


- Every 10 minutes it scans all the tasks in the database. A message is sent if there is a desired situation. 

![11.png](https://res.cloudinary.com/hpiynhbhq/image/upload/v1519488763/qi9svs1dlla7qcykji4h.png)


### Idea proposal 

I'm looking for new suggestions for a telegram bot.


<br /><hr/><em>Posted on <a href="https://utopian.io/utopian-io/@tolgahanuzun/utopmod-price-task-add-and-destroy">Utopian.io -  Rewarding Open Source Contributors</a></em><hr/>
👍 , , , , , , , , , , , , , , , , , , , , ,