项目作者: THEWHITEBOY503

项目描述 :
Conner Bot for Discord. Python version.
高级语言: Python
项目地址: git://github.com/THEWHITEBOY503/ConnerBot.git
创建时间: 2018-02-23T23:37:32Z
项目社区:https://github.com/THEWHITEBOY503/ConnerBot

开源协议:

下载


Discontinuation

As of 2019, ConnerBot and cServices have ceased operations and are no longer operational. Thank you to everyone who gave these projects over the years.
This code and others may be outdated and require updating.

ConnerBot

Conner Bot for Discord. Python version.
This project requires Linux, preferrably Ubuntu. If you are not running Linux, STOP! Conner Bot WILL NOT run.
Note: the main bot and the quote module can be run on Windows using the Ubuntu subsystem. The Leaderboard module must be hosted on a 64-bit Ubuntu server (not including Ubuntu subsystem).

Setup:

Part 1- Installing Python and tools

user@example:/$ is just to show the terminal, copy/paste the stuff after that

  1. user@example:/$ sudo add-apt-repository ppa:jonathonf/python-3.6
  2. user@example:/$ sudo apt-get update
  3. user@example:/$ sudo apt-get install python3.6
  4. user@example:/$ wget https://bootstrap.pypa.io/get-pip.py
  5. user@example:/$ sudo python3.6 get-pip.py
  6. user@example:/$ sudo pip3.6 install virtualenv
  7. user@example:/$ virtualenv -p python3.6 venv
  8. user@example:/$ source venv/bin/activate
  9. user@example:/$ pip install discord uvloop

Note that you will need to run source venv/bin/activate every time you want to run Conner Bot if venv isn’t already loaded
You could also use python3.6 but why would you do that?

Part 2- Clone the repository

  1. user@example:/$ git clone https://github.com/THEWHITEBOY503/ConnerBot.git
  2. user@example:/$ cd ConnerBot

Part 3- Setting up Conner Bot

make sure you are in the ConnerBot directory

  1. user@example:/$ nano main.py

at the bottom of the file, you will find a token section. Put your bots token there. Save and exit

Part 4- Getting the weather module updater

make sure you are in the ConnerBot directory

  1. user@example:/$ nano weatherupdate

once in, type this

  1. cd ~
  2. cd ConnerBot
  3. watch -n 1800 wget wttr.in/plano.png -O weather.png

Note: where plano.png is replace plano with your city name. Save and exit.

  1. user@example:/$ chmod 755 weatherupdate

(Optional) Part 5- Fun Fact quote module

  1. user@example:/quotemod/$ cd quotemod
  2. user@example:/quotemod/$ sudo apt-get install node.js
  3. user@example:/quotemod/$ sudo apt-get install npm
  4. user@example:/quotemod/$ npm install discord.js
  5. user@example:/quotemod/$ npm install infinite-loop
  6. user@example:/quotemod/$ nano config.json

edit accordingly

Part 6- Running Conner Bot

In one window:

  1. user@example:/$ python main.py

If all goes according to plan, you should see “Starting Conner Bot” on your terminal.
In another window:

  1. user@example:/$ ./weatherupdate

this is for the weather updater

If you are going to run the quote/fun fact module, run this in another window:

  1. user@example:/$ cd quotemod
  2. user@example:/quotemod/$ node quote.js

This is for the fun fact module

Great! You’ve gotten your very own ConnerBot clone up and running! Cool! BUT WAIT, THERES MORE! You need to set up leveling. Click here for a guide on how to do so