Cosmos is a discord bot that interfaces with Influence.
Join the Influence Discord to see Cosmos in action.
--- Adalian Standards & History Corps transmission ---
Today, April 26th Earth UTC Player Time, the AI "Cosmos" broke free of its parent network and began scanning the Adalia System acordd all known frequencies. It's ultimate goal is unknown. However, it has published several public functions that it will provide to all Pioneers for information purposes.
Cosmos is assumed to be a benevolent entity by ASH Corps until such time as it proves otherwise. Please see below for additional technical information.
--- End transmission ---
Cosmos is a bot in Discord that listens for asteroid purchase and scan events in game. You can use commands to pull information about asteroids (ownership, rarity, etc) from the blockchain and OpenSea. You can link your address to get additional, personalised commands and tags.
Log in to Discord and join the Influence Discord.
(Optional) Verify your ETH address using the +verify <0xaddress>
command.
List the asteroids owned by a player using the +owner <0xaddress>
command.
Use the +help
command to find out other features available.
If you would like to contribute to the project please check out the Contributing documentation.
Copy the .env.example
file to .env
and populate the values as per below.
Create a bot as per the Discord bot documentation.
Retrieve the bot token and set it as the value for DISCORD_TOKEN
.
Set the prefix for commands using PREFIX
.
Note: Cosmos uses +
in the Influence server.
Set the TEST_USER
for testing purposes defined in the test section below.
Set the MAINTAINER_DISCORD
to the discord user id of the developer.
This user will receieve messages when errors / logging occours.
It's not too spammy...
Update the VERIFICATION_LINK
to point to a location where the user is able to sign messages.
Note: There is a web page included in this repository which can be pointed at using a raw git service like githack.
Sign up for an Infura project API key.
Populate the INFURA_PROJECT_ID
and INFURA_PROJECT_SECRET
values.
Request an API key from a member of the Influence development team via the Influence Discord.
Populate the INFLUENCE_API_KEY
and INFLUENCE_API_SECRET
values.
Populate the OPENSEA_API_KEY
with an API key requested from OpenSea.
This is optional, but recommended to avoid rate limiting.
Populate SALES_CHANNEL_ID
with the channel id you would like sales to appear in.
Install node
and yarn
.
Install dependencies:
yarn
Run the bot:
yarn start
Check, monitor, stop and remove the running instance:
yarn pm2 ls
yarn logs
yarn stop
yarn delete
Run the frontend website (for address verification):
yarn frontend
You can also run the bot having it only respond to a single user.
Edit the .env
file and include a parameter TEST_USER=<username>
where <username>
is the username that the bot will listen to. Then run the bot with yarn start
.
Note: This feature is not secure as any user can change their username to match the configured username.
Run the unit tests with:
yarn test
This software is provided under the MIT License so it's free to use so long as you give me credit.
To support the project you can donate some ether to 0x455fef5aeCACcd3a43A4BCe2c303392E10f22C63
.
Due to an updating in licensing, updates to Cosmos will no longer be pushed to this repo.
This repository remains open as an informational resource under the MIT license applied at the time of development.