Skip to content

MirthFutures/honeyswap-discordpricebot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

discordpricebot

A Discord Bot for displaying Token Prices

About

This bot will interface with both Discord and the xDai Network to continually keep a log of token prices.

Note that this will only report the mid-price; buying and selling the tokens will be lower/higher than the listed price.

Configuration

See config.yaml.example. The token ticker is the parent key of the configuration.

The web3 module requires all addresses to be checksummed; you can get the proper address from BlockScout.

Authorizing Discord User

  • Visit https://discord.com/developers/applications and create 'New Application'.
  • Set a worthy name
  • On the page that follows, set the account name and save. Then click Bot
  • Create a Bot account and Save. Click 'Copy' on the Token; this is the API Key you use in the bot script
  • Visit the OAuth2 tab. Under Scopes, select 'bot'
  • The resulting URL is what you (or anyone) use to add your bot instance to a server.

A single bot instance can be added to multiple servers; the bot's nickname (the price) will be updated on all registered servers.

Installation and Execution

This assumes you already have python3 and pip3 installed on your system.

Install the pre-requisites:
pip3 install -r requirements.txt

Due to limitations in the discord.py module, you cannot run all bots in one instance. Therefore, you will need to create a new instance for each token by passing the argument, such as nohup python3 main.py HNY &.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages