statBot v2.0.0 update: Complete Rewrite and Discord Message UI changes

in #utopian-io8 years ago (edited)

statBot is a utility discord bot being used in #teammalaysia, AUS/NZ and Steemph.cebu. This bot has features like cryptocurrency price check, cryptocurrency conversion rate (between crypto to crypto and crypto to fiat)

favicon.png

Commit history

Screen Shot 2018-04-25 at 2.14.37 PM.png

New Features

  • What feature(s) did you add?

    • All source code rewritten into TypeScript. (Old codes is at old_src)
    • Added Discord Embedded Message to increase readability

Screen Shot 2018-04-25 at 2.43.22 PM.png
Screen Shot 2018-04-25 at 2.43.42 PM.png

  • Added new search for a certain tag performance. (Search of a tag from 01/01/2017 until today)

Screen Shot 2018-04-25 at 2.43.30 PM.png

  • Check price of a crypto directly with %price btc or $btc
    Screen Shot 2018-04-25 at 2.59.44 PM.png
  • How did you implement it/them?

    • Typescript is used, so that the code are easier to be mantained. Testing will be added in the next contribution.
    • Embedded message is done instead of sending strings like 'Hello World', send in with embed object.
{
    embed: {
      color: color.green,
      description: 'Created by @superoo7',
      fields: [
        {
          name: 'License',
          value: 'on 2017-2018 (MIT LICENSE)'
        },
        {
          name: 'GitHub Repository',
          value: 'https://github.com/superoo7/steem-discord'
        }
    ],
    timestamp: new Date(),
    footer: {
      icon_url: client.user.avatarURL,
      text: '© superoo7'
    }
  }
}
  • Search is done with SteemSQL. The SQL queries are here:
select
 SUM(net_votes) as Votes,
 SUM(pending_payout_value) as PendingPayouts,
 SUM(children) as Comments,
 COUNT(*) as Posts
from
 Comments
where
 depth = 0 AND
 created >= '2017/01/01' AND
 CONTAINS(json_metadata, 'utopian-io')
order by
 Votes desc

About this Projects

  • What is the project about?

    This is a discord bot that are able to consume Steem API, check crypto price, convert crypto and fiat price, use of SteemSQL to carry out Query about Steem Blockchain.

  • Technology Stack

TypeScript, MSSQL(SteemSQL)

  • Roadmap

    • Check delegators and delegatee
    • Coversion of fiat to fiat
    • Added Testing (Jest)
    • Detail documentation on all the available commands
  • How to contribute?

To contribute, first you need to have SteemSQL subscription.

Edit the .env file, and paste ur SteemSQL subscription details into it

Pull Request and Issue filling are welcomed on GitHub



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

This post has been curated by TeamMalaysia Community :-

To support the growth of TeamMalaysia Follow our upvotes by using steemauto.com and follow trail of @myach

Vote TeamMalaysia witness bitrocker2020 using this link vote for witness

Thank you for you contribution.


Need help? Write a ticket on https://support.utopian.io.
Chat with us on Discord.

[utopian-moderator]

Thank you moderator.

Awesome job bro !!! although i only understand 10% of your post!! haha... cheers bro

This is more like a development report haahaa, just look at the image and understand how it works can d hehe.

Hey @superoo7! Thank you for the great work you've done!

We're already looking forward to your next contribution!

Fully Decentralized Rewards

We hope you will take the time to share your expertise and knowledge by rating contributions made by others on Utopian.io to help us reward the best contributions together.

Utopian Witness!

Vote for Utopian Witness! We are made of developers, system administrators, entrepreneurs, artists, content creators, thinkers. We embrace every nationality, mindset and belief.

Want to chat? Join us on Discord https://discord.me/utopian-io