Browse Source

Renamed config file to roxbot.conf, changed some links in the docs, redid the readme, moved requirements to build docs into another requirements.txt,

tags/v2.0.0
Roxie Gibson 5 years ago
parent
commit
236a9598e0
9 changed files with 92 additions and 34 deletions
  1. +2
    -0
      .gitignore
  2. +61
    -11
      README.md
  3. +3
    -0
      docs/requirements.txt
  4. +2
    -1
      mkdocs.yml
  5. +1
    -3
      requirements.txt
  6. +2
    -2
      roxbot.py
  7. +10
    -4
      roxbot/__init__.py
  8. +0
    -2
      roxbot/settings/roxbot_example.conf
  9. +11
    -11
      setup.py

+ 2
- 0
.gitignore View File

@@ -18,3 +18,5 @@ env/
roxbot/settings/servers/*

site/

roxbot/settings/roxbot\.conf

+ 61
- 11
README.md View File

@@ -2,22 +2,72 @@

[![Python](https://img.shields.io/badge/Python-3.5%2B-blue.svg?style=flat-square)](https://gitlab.roxxers.xyz/roxxers/roxbot)
[![MIT](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](https://gitlab.roxxers.xyz/roxxers/roxbot/blob/master/LICENSE)
[![MRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
[![Say Thanks](https://img.shields.io/badge/say-thanks-ff69b4.svg?style=flat-square)](https://saythanks.io/to/roxxers)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
[<img src="https://discordapp.com/api/guilds/450805414024577035/widget.png?style=shield">](https://discord.gg/Mpz8nv7)

Roxbot, A modular Discord bot made by a (former) Mercy Main. Built with love (and discord.py)
Roxbot: An inclusive modular multi-purpose Discord bot. Built with love (and discord.py) by Roxxers#7443.

## Setup
_Coming Soon_
Roxbot is designed to be provide many different services for users and modertors alike with a focus on customisability. Roxbot also has a focus on being inclusive and being fun for all kinds of people. Roxbot is a bot written by a queer woman with the lgbt community in mind.

## Command Docs
_Coming Soon_

## [Changelog](https://github.com/master/roxxers/roxbot/blob/master/CHANGELOG.md)
[Changelog](https://github.com/Roxxers/roxbot/blob/master/CHANGELOG.md) - [Dosc](https://roxxers.github.io/roxbot/) - [Command Docs](https://roxxers.github.io/roxbot/commands/)


# Quick Setup

Roxbot has only been tested on Linux machines so far so these instructions are written for Linux users.

Requirements:

- Python 3.5 or higher
- Pip (to install dependencies)
- A Discord bot account ([How to make a bot account](https://discordpy.readthedocs.io/en/rewrite/discord.html#creating-a-bot-account))

Optional Requirements:
- Imgur API client ID (for Reddit cog. Create a application to gain access to the Imgur API [here](https://api.imgur.com/oauth2/addclient))
- ffmpeg (for Voice cog [music bot])
- libopus (for Voice cog [music bot])

If you don't meet the requirements for a cog, be sure to comment out that cog in the `roxbot/__init__.py` file.

1. Clone Roxbot to your system

```bash
$ git clone https://github.com/roxxers/roxbot.git
$ cd roxbot/
```

2. Create a venv for Roxbot

```bash
$ python3 -m venv ./env
$ source env/bin/activate # For bash and zsh users
$ source env/bin/activate.fish # For fish users
```
3. Install Python dependencies

```bash
$ python3 -m pip install -r requirements.txt
```

4. Edit Roxbot's config to add your bot accounts token (and imgur api token if you plan to use the Reddit cog) to the config, and also edit some other config settings. Then rename it so that Roxbot will be able to read it.

```bash
$ nano roxbot/settings/roxbot_example.conf
$ mv roxbot/settings/roxbot_example.conf roxbot/settings/roxbot.conf
```
5. Run Roxbot and she should setup everything if you haven't run her before.

```bash
$ ./roxbot
```
# Need Support?

If you want Roxbot support, a support Discord can be found by clicking the Discord banner at the top of the readme,

# Support Me <small>If you want/can</small>

## Support Me
[![KoFi](https://i.imgur.com/IE2Qg79.png)](https://ko-fi.com/roxxers)

## License
[MIT License](https://github.com/roxxers/roxbot/blob/master/LICENSE)

+ 3
- 0
docs/requirements.txt View File

@@ -0,0 +1,3 @@
mkdocs
pymdown-extensions
mkdocs-material

+ 2
- 1
mkdocs.yml View File

@@ -42,8 +42,9 @@ nav:
- 'Configuring Roxbot': 'config.md'
- 'Creating Cogs For Roxbot': 'creating_cogs.md'
- About:
- 'Changelog': 'https://github.com/Roxxers/roxbot/blob/master/CHANGELOG.md'
- 'Contributing': 'contributing.md'
- 'License': 'LICENSE.md'
- 'License': 'https://github.com/Roxxers/roxbot/blob/master/LICENSE.md'


# Customisation

+ 1
- 3
requirements.txt View File

@@ -3,6 +3,4 @@ beautifulsoup4==4.6.0
pillow==5.1.0
numpy==1.14.3
youtube_dl
pymdown-extensions
mkdocs-material
emoji
emoji==0.5.1

+ 2
- 2
roxbot.py View File

@@ -139,8 +139,8 @@ async def settings():

if __name__ == "__main__":
# Pre-Boot checks
if not os.path.isfile("roxbot/settings/preferences.ini"):
print("PREFERENCE FILE MISSING. Please make sure there is a file called 'preferences.ini' in the settings folder")
if not os.path.isfile("roxbot/settings/roxbot.conf"):
print("PREFERENCE FILE MISSING. Please make sure there is a file called 'roxbot.conf' in the settings folder")
exit(0)

start_time = time.time()

+ 10
- 4
roxbot/__init__.py View File

@@ -7,19 +7,25 @@
# | |\ \\ \_/ / /^\ \| |_/ /\ \_/ / | |
# \_| \_|\___/\/ \/\____/ \___/ \_/

# Roxbot, an inclusive Discord bot
# Roxbot: An inclusive modular multi-purpose Discord bot.

__title__ = "roxbot"
__author__ = "Roxanne Gibson"
__license__ = "MIT"
__copyright__ = "Copyright 2015-2017 Roxanne Gibson"
__version__ = "2.0.0"
__description__ = """Roxbot, an inclusive Discord bot. Built with love (and discord.py) by Roxxers#7443.
__description__ = """Roxbot: An inclusive modular multi-purpose Discord bot. Built with love (and discord.py) by Roxxers#7443.

Roxbot is designed to be provide many different services for users and modertors alike with a focus on customisability.

Roxbot also has a focus on being inclusive and being fun for all kinds of people. Roxbot is a bot written by a queer woman with the lgbt community in mind.


[Github link](https://github.com/roxxers/roxbot)
[Changelog](https://github.com/roxxers/roxbot/blob/master/CHANGELOG.md)
[Docs](https://roxxers.github.io/roxbot/)
[Found a bug or need to report an issue? Report it here](https://github.com/roxxers/roxbot/issues/new)
[Say Thanks](https://saythanks.io/to/Roxxers)"""
"""

from roxbot import checks, http, guild_settings, converters, utils, roxbotfacts
from roxbot.exceptions import *
@@ -31,7 +37,7 @@ import configparser
dev_mode = False

config = configparser.ConfigParser()
config.read("roxbot/settings/preferences.ini")
config.read("roxbot/settings/roxbot.conf")

command_prefix = config["Roxbot"]["Command_Prefix"]
owner = int(config["Roxbot"]["OwnerID"])

roxbot/settings/preferences_example.ini → roxbot/settings/roxbot_example.conf View File

@@ -9,10 +9,8 @@ Command_Prefix=r;
; Explaination:
; Discord: This is the Token given when you register your bot account. (REQUIRED)
; Imgur: Used in the reddit cog. This is your Client ID, given when you register a client with Imgur.
; Tastsumaki: Only used by custom GSSP cog. Normal users can ignore.
Discord=TokenHere
Imgur=TokenHere
Tatsumaki=TokenHere

[Backups]
; Settings for the server settings backups.

+ 11
- 11
setup.py View File

@@ -57,10 +57,10 @@ def requirements():

def create_preferences_file():
time.sleep(.5)
print("{} Creating preferences.ini file...".format(INFO))
with open("roxbot/settings/preferences_example.ini", "r") as orig:
print("{} Creating roxbot.conf file...".format(INFO))
with open("roxbot/settings/roxbot_example.conf", "r") as orig:
fp = orig.read()
with open("roxbot/settings/preferences.ini", "w") as new:
with open("roxbot/settings/roxbot.conf", "w") as new:
new.write(fp)
time.sleep(.5)
print("{} Preferences file created".format(OK))
@@ -68,8 +68,8 @@ def create_preferences_file():


def preferences_setup():
# Ask to do preferences.ini setup
print("{} Most of the setup is complete. All there is to do is setup the preferences.ini file.".format(INFO))
# Ask to do roxbot.conf setup
print("{} Most of the setup is complete. All there is to do is setup the roxbot.conf file.".format(INFO))
print("{} You can do the quick setup in this script, or manually setup the file yourself.".format(INFO))
print("")
while True:
@@ -78,7 +78,7 @@ def preferences_setup():
time.sleep(.5)
print("")
print("{} Everything asked for next is required. Please try and input every option. "
"If not possible, it is required you fix this in the preferences.ini file later.".format(WARN))
"If not possible, it is required you fix this in the roxbot.conf file later.".format(WARN))
print("")
break
elif choice.strip(" ").lower() == "n":
@@ -88,7 +88,7 @@ def preferences_setup():
# Preferences.ini setup

config = configparser.ConfigParser()
config.read("roxbot/settings/preferences.ini")
config.read("roxbot/settings/roxbot.conf")
print("{} Setting up preferences file...".format(INFO))

# OWNER ID
@@ -128,12 +128,12 @@ def preferences_setup():
print("")

# SAVE
# TODO: Add comments back in once preferences.ini has been rewritten
print("{} Finished preferences.ini setup.".format(OK))
with open("roxbot/settings/preferences.ini", 'w') as configfile:
# TODO: Add comments back in once roxbot.conf has been rewritten
print("{} Finished roxbot.conf setup.".format(OK))
with open("roxbot/settings/roxbot.conf", 'w') as configfile:
config.write(configfile)

print("{} There are more options avaliable in the file (found at ./roxbot/settings/preferences.ini) if you want to make optional tweaks to Roxbot.".format(INFO))
print("{} There are more options avaliable in the file (found at ./roxbot/settings/roxbot.conf) if you want to make optional tweaks to Roxbot.".format(INFO))
print("{} Exiting...".format(OK))
exit(0)


Loading…
Cancel
Save