Assistant Bot

Hi,

As some of you will probably have noticed, I have been working on a forum helper bot the last few days and I’m happy to announce that it is now stable enough for public use.
The functions that have been implemented so far are:


about: (PM) Shows bot info.
help: (PM) Shows this help screen.


===== Tip Commands (send in PM) =====
register: Register for tipping.
info: Get your current balance and deposit address
history: Get the transaction and tipping history of your tipping account
withdraw [address]: Withdraw your entire balance from the tipping account to [address]

===== Formatting Commands (send in PM) =====
hash [motion]: Hash a motion into the preferred format.

============ Bot Mention Commands ============
(these can appear anywhere in a post but the format must be as below)

@assistant liquidity: Get the current liquidity information
@assistant block count: Get the current block count
@assistant block hash [index]: Get the hash for the [index] block
@assistant custodian votes: Get the latest Custodian Votes
@assistant custodian vote [address]: Get the vote details for the Custodian address [address]
@assistant motion votes: Get the latest Motion Votes
@assistant motion vote [motion_hash]: Get the vote details for the motion with hash [motion_hash]
@assistant park rates: Get the latest Park Rate values
@assistant park rate votes: Get the latest Park Rate Votes

and finally, Tipping
@assistant tip [amount] @[user]: Send a tip of [amount] NBT to @[user].
[amount] can be a key word. Send a PM to the bot with ‘keywords’ as the first word for a list.



The main aim of this bot was to standardise the way in which motions and custodian proposals are formatted as well as giving a browser independent way of verifying the hash of a motion/proposal.
The methods that I have built in so far are useful but I mainly used them to iron out the bugs in the bot code to make sure it can run unaided for the main part. I would like to start work on the hash functions properly now.
There already exists a ‘hash’ method which will generate an RIPEMD160 hash of a formatted motion but before it gets used properly I wanted to get some feedback from the community on the preferred formats for motions and custodial proposals.

If I send the bot user a Private message which says

hash this is a test motion

I will receive the following:

ripemd160 hash: 836670cc16303aaa6e2c93891c7d9c6123c09ae7
=############ Motion Hash starts with this line ############=

this is a test motion

=############ Motion Hash ends with this line ############=

does that suit everyone as a format for motions or should there be more formatting to indicate the motion text such as

ripemd160 hash: 836670cc16303aaa6e2c93891c7d9c6123c09ae7
=############ Motion Hash starts with this line ############=

this is a test motion

=############ Motion Hash ends with this line ############=

Should the hash include the top and bottom lines or exclude them.

What about custodial proposals?

Once we decide on a preferred layout for motions and proposals, it will be easier to build tools to recognise them among the other forum posts and then to extract them to provide tailored data feeds (for example).

So, what are your thoughts?

######mods - feel free to delete the bot testing thread.

1 Like

Hi woolly_sammoth

I’m afraid your tip of [amount] NBT to @[user]**: failed as I didn’t recognise [amount] as a valid tip amount.
Please try again.

1 Like

@assistant tip 1 @woolly_sammoth :smile:

Really nice little bot, thanks a lot. I’d personally prefer the forum formatting in order to indicate motion texts, because the ASCII boundaries are prone to be inconsistent in different motions. Ideally it would be nice if the motion text could be parsed from a link to the motion within this forum.

Running in ‘test mode’

Tip of 1 NBT requested from @creon to @woolly_sammoth

It doesn’t seem to send my tip, my balance also didn’t change … Its also a bit nasty that the forum thinks I want to spam the bot because I want to PM him the same message (info) again.

[quote=“creon, post:5, topic:1200”][quote=“assistant, post:4, topic:1200”]
Running in ‘test mode’
[/quote]

It doesn’t seem to send my tip, my balance also didn’t change … Its also a bit nasty that the forum thinks I want to spam the bot because I want to PM him the same message (info) again.[/quote]Not really.

1 Like

Sorry, I had test mode enabled. try again with the tip and it should work.
I can’t control the forum I’m afraid. it’s just anti spam measures. Luckily the bot will ignore any text before and after the command so you can just type other words to make the post unique.

(I’ve also turned off the sassy bot replies)

@assistant tip 1 @woolly_sammoth

Hi creon

Your tip of 1 NBT has been credited to @woolly_sammoth

thank you.

hmm. that didn;t work. back to testing I’m afraid.

@assistant tip 1

Running in ‘test mode’

Tip of 1 NBT requested from @woolly_sammoth to @creon

@assistant tip 1

Hi woolly_sammoth

Your tip of 1 NBT has been credited to @creon

hmm. still not moving the funds between accounts

Is it fully synced? I cannot call @assistant block count it always says that it doesn’t recognize the command.

EDIT: Ah here it works, but it doesn’t in PM.

Hi creon

The current count of the highest block on the longest chain is 189371

yes. block count is a ‘mention’ command so works when you invoke the bot in a post.

and yes, it is fully synced. I had some trouble with my commands to unlock and re-lock the wallet. I would have hoped that it would throw an error if they weren’t working currently but it seems to be fine.
I’ll have another tinker after lunch

this time, I can feel it
@assistant tip 1