Skip to content

A basic Crabber bot that posts randomly from a list of quotes.

Notifications You must be signed in to change notification settings

crabber-net/simple-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Bot

A basic Crabber bot that posts randomly from a list of quotes.

Installation

  1. Clone this repository
~$ git clone https://github.com/crabber-net/simple-bot/
~$ cd simple-bot
  1. Create an account for your bot on Crabber

  2. Generate a developer key and access token on Crabber's developer page

  3. In your project directory, create a file called .env and put the following content in it:

export CRABBER_DEPLOY_KEY="{{your developer key}}"
export CRABBER_DEPLOY_TOKEN="{{your access token}}"
  1. Edit quotes.txt and fill it with stuff you want the bot to post.

  2. [Only once] Install the dependencies

# with poetry
~/parabot$ poetry install
# or with pip
~/parabot$ pip3 install -r requirements.txt
  1. Run your bot and see if it works!
# with poetry
~/parabot$ poetry run python simple_bot.py
# or with pip
~/parabot$ python3 simple_bot.py

If it was successful you should see something like this in the logs:

2021-11-07 12:24:39.791 | INFO     | __main__:<module>:68 - Posted molt successfully.

Otherwise, read the logs and look for what went wrong. It's likely something pretty simple.

  1. Deploy your bot! There are a lot of ways to do this so it's recommended you look up the best way to do it on your system. Here are a couple recommended options:
    • Linux: crontab
    • Windows: Windows Task Scheduler
    • macOS: Shortcuts, Automator, or crontab

About

A basic Crabber bot that posts randomly from a list of quotes.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages