catbot-9000 is a javascript market-loser bot running on node.js.

Overview

catbot-9000

catbot-9000 is a Chia bot framework running on node.js. It was used during the CATMOS launch event on Hashgreen.

If you are looking for the simpler "hello world" version of catbot-9000 that was actually used for the Hashgreen launch, change the branch to 0.1-hello-world.

It uses custom client libraries for the following APIs:

It also uses the following libraries:

  • For Discord integration, it uses the excellent Discord.js client library.
  • For parsing emojis from text, it uses the emoji-translate library.

The credit behind the Chia RPC javascript library goes to OfferPool. This code was instrumental for me to understand how to connect securely to the RPC endpoint using the wallet's SSL certificates.

catbot-9000
└─── README.md  .......................................................  You are here
└─── .env.example  ....................................................  copy/rename to .env and upate your settings
│
└─── catbot
	└─── server.js  ...................................................  Main start code
	|
	└─── api-clients
	|   └─── ChiaWalletRpcClient.js  ..................................  Chia Wallet RPC API
	│   └─── HashgreenClient.js  ......................................  Hashgreen API
	│   └─── ICanHazDadJokeClient.js  .................................  ICanHazDadJoke API
	│   └─── SpacescanClient.js  ......................................  Spacescan API
	│   └─── TailDatabaseClient.js  ...................................  TailDatabase API
	│   └─── XchTokenClient.js  .......................................  XchToken API
	│
	└───controllers
	|   └─── TokenController.js  ......................................  token syncing and aggregation logic
	│
	└───models
	|   └─── Token.js  ................................................  token data structures
	│
	└───workers  ......................................................  each worker is a different bot
	    └─── discord  .................................................  all logic for discord bot
	    |   └─── DeployCommands.js  ...................................  deploys commands to Discord servers
	    |   └─── DiscordBot.js  .......................................  start code for Discord bot
	    |   |		
	    |   └─── commands  ............................................  command interation
	    |   |   └─── Cat.js  ..........................................  handles /cat command
	    |   |   └─── Config.js  .......................................  handles /config command
	    |   |   └─── Prove.js  ........................................  handles /prove command
	    |   |		
	    |   └─── events  ..............................................  event interation
	    |   |   └─── CatAutoCompleteInteraction.js  ...................  handles autocomplete for /cat
	    |   |   └─── CatSelectMenuInteraction.js  .....................  handles select menu for /cat
	    |   |   └─── ClientReady.js  ..................................  handles main Discord client events
	    |   |   └─── CommandInteractionRouter.js  .....................  routes all command events
	    |   |   └─── ProveButtonInteraction.js  .......................  handles buttons for /prove
	    |   |   └─── UploadOfferFileMessage.js  .......................  handles offer upload messages
	    |   |		
	    |   └─── templates  ...........................................  templates for embeds/components
	    |       └─── CatConfigureComponents.js  .......................  configures /cat components
	    |       └─── CatConfigureEmbeds.js  ...........................  configures /cat embeds
	    |       └─── OfferConfigureEmbeds.js  .........................  configures offer upload embeds
	    |   
	    └─── market-maker  ............................................  market maker bot
	    	└─── MarketMakerBot.js  ...................................  all logic for market maker bot

Usage

  1. Copy .env.example and rename it .env. Update this new .env file with your settings.
  2. npm install
  3. node app.js

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

Apache License, Version 2.0

You might also like...

Full-featured, middleware-oriented, programmatic HTTP and WebSocket proxy for node.js

rocky A multipurpose, full-featured, middleware-oriented and hackable HTTP/S and WebSocket proxy with powerful built-in features such as versatile rou

Nov 24, 2022

Simplifies node HTTP request making.

Requestify - Simplifies node HTTP request making. Requestify is a super easy to use and extendable HTTP client for nodeJS + it supports cache (-:. Ins

Nov 28, 2022

A fully-featured Node.js REST client built for ease-of-use and resilience

A fully-featured Node.js REST client built for ease-of-use and resilience

flashheart A fully-featured Node.js REST client built for ease-of-use and resilience flashheart is built on http-transport to provide everything you n

Jun 21, 2022

Run HTTP over UDP with Node.js

nodejs-httpp - Run HTTP over UDP based transport and Bring Web in Peer or P2P styles main js modules: udt.js, httpp.js, udts.js and httpps.js, that's

Aug 2, 2022

一个基于node.js,express,socket.io的websocket非常棒的聊天室,代码简单很适合新手. A very nice websocket chat room based on node.js, express, socket.io. the code is simple, very suitable for novices

一个基于node.js,express,socket.io的websocket非常棒的聊天室,代码简单很适合新手.  A very nice websocket chat room based on node.js, express, socket.io. the code is simple, very suitable for novices

来来往下看,虽然教程又臭又长但是一步步地保姆式教学很简单的,毕竟我是真菜鸟嘛,当然什么都往细了说╮(╯_╰)╭ 一、使用方法 该教程内容所有指令都为Linux CentOS 7.x环境下指令,其他平台请您自行查询(⊙x⊙;) 1.下载node.js并下载Sakura_Chat_Room node.j

Jul 21, 2022

node

node

第一步 安装 node node版本须大于14 安装地址http://nodejs.cn/安装页面上的版本即可 下载对应你的系统的安装包 打开安装包,一直下一步到安装完成即可 填入你的cookie inTimeActive 和 longActive 里面的jdCookie.js填入你的cookie

Feb 17, 2022

QBasic compiler that runs on node.js

QBasic.js QBasic.js allows you to use qb.js inside node projects. Example CLI $ npx qbasic --source=filePath.bas index.js const { compileFile } = requ

Oct 24, 2022

Trying to reduce the search time, the objective of this repository is accumulate as many useful code snippets for Node.Js in the real world as possible

Useful Node.Js codes Trying to reduce the search time, the objective of this repository is accumulate as many useful code snippets for Node.Js in the

Mar 28, 2022

Very very very powerful, extensible http client for both node.js and browser.

ES-Fetch-API 中文 | English Very very very powerful, extensible http client for both node.js and browser. Why should you use ES-Fetch API? Still using a

Dec 12, 2022
Owner
null
A bot that updates a embed for FiveM servers information c:

IN-ServerStatus A discord bot that interacts with (https://github.com/PABLO-1610/cfx-api) Discord JS v14 Slash Commands How to install npm install Cre

Dexvo 15 Dec 10, 2022
Promise based HTTP client for the browser and node.js

axios Promise based HTTP client for the browser and node.js New axios docs website: click here Table of Contents Features Browser Support Installing E

axios 98k Dec 31, 2022
Ajax for Node.js and browsers (JS HTTP client)

superagent Small progressive client-side HTTP request library, and Node.js module with the same API, supporting many high-level HTTP client features T

Sloth 16.2k Jan 1, 2023
A full-featured http proxy for node.js

node-http-proxy node-http-proxy is an HTTP programmable proxying library that supports websockets. It is suitable for implementing components such as

http ... PARTY! 13.1k Jan 3, 2023
HTTP server mocking and expectations library for Node.js

Nock HTTP server mocking and expectations library for Node.js Nock can be used to test modules that perform HTTP requests in isolation. For instance,

Nock 11.9k Jan 3, 2023
🌐 Human-friendly and powerful HTTP request library for Node.js

Sindre's open source work is supported by the community. Special thanks to: Human-friendly and powerful HTTP request library for Node.js Moving from R

Sindre Sorhus 12.5k Jan 9, 2023
Isomorphic WHATWG Fetch API, for Node & Browserify

isomorphic-fetch Fetch for node and Browserify. Built on top of GitHub's WHATWG Fetch polyfill. Warnings This adds fetch as a global so that its API i

Matt Andrews 6.9k Jan 2, 2023
A light-weight module that brings the Fetch API to Node.js

A light-weight module that brings Fetch API to Node.js. Consider supporting us on our Open Collective: Motivation Features Difference from client-side

Node Fetch 8.1k Jan 4, 2023
SPDY server on Node.js

SPDY Server for node.js With this module you can create HTTP2 / SPDY servers in node.js with natural http module interface and fallback to regular htt

SPDY & HTTP2 in JavaScript 2.8k Jan 4, 2023
libcurl bindings for Node.js

node-libcurl The fastest URL transfer library for Node.js. libcurl bindings for Node.js. libcurl official description: libcurl is a free and easy-to-u

Jonathan Cardoso 565 Jan 2, 2023