Browse Source

Added fun to the docs and fixed the emoji extension in mkdocs.

tags/v2.0.0
Roxie Gibson 5 years ago
parent
commit
8f44684504
7 changed files with 262 additions and 30 deletions
  1. +210
    -1
      docs/commands.md
  2. +1
    -1
      docs/trivia.md
  3. +1
    -1
      mkdocs.yml
  4. +47
    -26
      roxbot/cogs/fun.py
  5. +1
    -0
      roxbot/cogs/nsfw.py
  6. +1
    -1
      roxbot/cogs/util.py
  7. +1
    -0
      roxbot/cogs/voice.py

+ 210
- 1
docs/commands.md View File

@@ -12,6 +12,12 @@ Before reading this, it is highly recommened you read the [quick start](quicksta

## How to use the docs

### What is an alias?

An alias is just another way of executing the command. Usually to shorten the command to be easier to type. If `emoji` is an alias of `emote`, using either `emoji` or `emote` will execute `emote`.

### What do I do when a command wants a channel, user, role, etc.?

When the command wants a CHANNEL, USER, MEMBER, or ROLE. This means the ID, name, or mention of that part of Discord. Role, User, and Member mentions start with a '@' and Channel mentions start with a '#'. A Member is the same as a User except a Member is explicitly a User in a Guild.

## Core Commands
@@ -174,20 +180,124 @@ __;warn set_limit__

## Fun

The Fun cog provides many commands just meant to be fun. Full of a lot of misc commands as well that might provide a few laughs or be entertaining.

### ;aesthetics

Converts text to be more aesthetic <small>fix-width text</small>

Command Structure:

`;aesthetics text`

Aliases:

`ae`, `aesthetic`

Example:

```py
# Convert "Hello World" to fixed-width text.
;ae Hello World
```

### ;coinflip

Filps a magical digital coin!

Command Structure:

`;coinfilp`

Aliases:

`cf`

### ;frogtips

RETURNS FROG TIPS FOR HOW TO OPERATE YOUR FROG

Command Structure:

`;frogtips`

Aliases:

`ft`, `frog`

### ;hug

Gives headpats to the mentioned user :3

Command Structure:

`;hug USER`

Options:

- `USER` - A name, ID, or mention of a user.

Examples:
```py
# Two ways to give Roxbot hugs.
;hug @Roxbot#4170
;hug Roxbot
```

### ;numberfact

Returns a fact for the positive integer given. A random number is chosen if none is given.

Command Structure:

`;numberfact postive_integer`

Aliases:

`nf`

Example:

```py
# Random fact for the number 35
;nf 35
```

### ;onthisday

Returns a random fact of something that happened today!

Command Structure:

`;onthisday`

Aliases:

`otd`

### ;pet

Gives headpats to the mentioned user :3

Command Structure:

`;pet USER`

Aliases:

`headpat`, `pat`

Options:

- `USER` - A name, ID, or mention of a user.

Examples:
```py
# Two ways to give Roxbot headpats.
;pet @Roxbot#4170
;pet Roxbot
```

### ;roll

Rolls a die using dice expression format. Spaces in the expression are ignored.
@@ -226,18 +336,96 @@ Credit: TBTerra#5677

### ;roxbotfact

Returns a random fact about Roxbot! Roxbot has her own lore that you can discover through out these facts. Written especially for Roxbot.

Command Structure:

`;roxbotfact`

Aliases:

`rf`, `roxfact`

### ;spank

!!! warning
This command will only work in channels marked NSFW or DMs.

Spanks the mentioned user :wink:

Command Structure:

`;spank USER`

Options:

- `USER` - A name, ID, or mention of a user.

Examples:
```py
# Two ways to give Roxbot spanks.
;spank @Roxbot#4170
;spank Roxbot
```

### ;suck

!!! warning
This command will only work in channels marked NSFW or DMs.

Sucks the mentioned user :wink:

Command Structure:

`;suck USER`

Aliases:

`succ`

Options:

- `USER` - A name, ID, or mention of a user.

Examples:
```py
# Two ways to give Roxbot the succ.
;suck @Roxbot#4170
;suck Roxbot
```

### ;waifurate

Rates the mentioned waifu(s). By using the aliases husbandorate or spousurate, it will change how Roxbot addresses those who she has rated.

Command Structure:

`;waifurate`

Aliases:

Waifu Aliases:

`wf`, `wr`

Husbando Aliases:

`husbandorate`, `hr`

Spousu Aliases:

`spousurate`, `sr`

Example:

```py
# Rate user#9999
;waifurate @user#9999
```

!!! quote ""
This command is dedicated to Hannah, who came up with the command. I hope she's out there getting her waifus rated in peace.

### ;xkcd

Grabs the image & metadata of the given xkcd comic. The query can be a comic number, comic title, or latest to get the latest. If not given, Roxbot will return a random comic.
@@ -261,6 +449,23 @@ Example:

### ;zalgo

Sends text to the nether and returns it back to you ̭҉̭̭ͭi̭͎̭ṋ̭̀҈̭̭̋ ̭͉̭z̭̩̭a̭̭̽ḽ̦̭g̭̞̭o̭̤̭ ̭̭͑f̭̻̭o̭̭͢r̭̭̀m̭̭ͮ

Command Structure:

`;zalgo text`

Aliases:

`za`

Example:

```py
# Convert "Hello World" to zalgo.
;zalgo Hello World
```

---

## ImageEditor
@@ -415,6 +620,8 @@ Example:

## NSFW

The NSFW cog is a collection of commands that post images from popular NSFW sites.

### ;e621

!!! warning
@@ -777,7 +984,7 @@ Example:

## Util

This cog is filled with a number of utility commands.
The Util cog is a cog filled with a number of utility commands to help more advanced users of Discord.

### ;avatar

@@ -890,6 +1097,8 @@ Example:

## Voice

The Voice cog is a cog that adds and manages a fully-functional music bot for Roxbot.

!!! warning
This whole cog cannot be used in private messages.


+ 1
- 1
docs/trivia.md View File

@@ -22,7 +22,7 @@ Yes! You can change the length of the game by using the argument `-l or --length

Yes! Trivia is best with friends. How else would friendships come to their untimely demise? You can only join a game during the 20 second waiting period after a game is started. Just type `;trivia join` and you're in! You can leave a game at anytime (even if its just you) by doing `;trivia leave`. If no players are in a game, the game will end and no one will win ;-;

## What if I don't want anyone to join my solo game? Waiting is boring!**
## What if I don't want anyone to join my solo game? Waiting is boring!

No problem! Just put `-s or --solo` anywhere after `;trivia start`


+ 1
- 1
mkdocs.yml View File

@@ -82,7 +82,7 @@ markdown_extensions:
- pymdownx.critic
- pymdownx.details
- pymdownx.emoji:
emoji_generator: python/name:pymdownx.emoji.to_svg
emoji_generator: !!python/name:pymdownx.emoji.to_svg
- pymdownx.inlinehilite
- pymdownx.magiclink
- pymdownx.mark

+ 47
- 26
roxbot/cogs/fun.py View File

@@ -35,6 +35,7 @@ import roxbot


class Fun:
"""The Fun cog provides many commands just meant to be fun. Full of a lot of misc commands as well that might provide a few laughs or be entertaining."""
def __init__(self, bot_client):
self.bot = bot_client
self.croak = {}
@@ -191,9 +192,10 @@ class Fun:
async def spank(self, ctx, *, user: discord.User = None):
"""
Spanks the mentioned user ;)
Usage:
{command_prefix}spank @roxbot#4170
{command_prefix}spank roxbot
Exmaples:
# Two ways to give Roxbot spanks.
;spank @Roxbot#4170
;spank Roxbot
"""
if not user:
return await ctx.send("You didn't mention someone for me to spank")
@@ -204,9 +206,11 @@ class Fun:
async def suck(self, ctx, *, user: discord.User = None):
"""
Sucks the mentioned user ;)
Usage:
{command_prefix}suck @roxbot#4170
{command_prefix}suck roxbot

Examples:
# Two ways to give Roxbot the succ.
;suck @Roxbot#4170
;suck Roxbot
"""
if not user:
return await ctx.send("You didn't mention someone for me to suck")
@@ -216,9 +220,11 @@ class Fun:
async def hug(self, ctx, *, user: discord.User = None):
"""
Hugs the mentioned user :3
Usage:
{command_prefix}hug @roxbot#4170
{command_prefix}hug Roxbott

Examples:
# Two ways to give Roxbot hugs.
;hug @Roxbot#4170
;hug Roxbot
"""
if not user:
return await ctx.send("You didn't mention someone for me to hug")
@@ -228,9 +234,11 @@ class Fun:
async def pet(self, ctx, *, user: discord.User = None):
"""
Gives headpats to the mentioned user :3
Usage:
{command_prefix}pet @roxbot#4170
{command_prefix}pet roxbot

Examples:
# Two ways to give Roxbot headpats.
;pet @Roxbot#4170
;pet Roxbot
"""
if not user:
return await ctx.send("You didn't mention someone for me to headpat")
@@ -239,10 +247,11 @@ class Fun:
@commands.command(aliases=["wf", "wr", "husbandorate", "hr", "spousurate", "sr"])
async def waifurate(self, ctx, *waifu: commands.Greedy[discord.Member]):
"""
Rates the mentioned waifu(s). husbando/spousu-rate also work.
Usage:
{command_prefix}waifurate @user#9999
This command is in dedicated to Hannah, who suggested this command to me. I hope she's out there, somewhere, getting her waifus rated in peace.
Rates the mentioned waifu(s). By using the aliases husbandorate or spousurate, it will change how Roxbot addresses those who she has rated.
Example:
;waifurate @user#9999

This command is dedicated to Hannah, who came up with the command. I hope she's out there getting her waifus rated in peace.
"""
if ctx.invoked_with in ["hr", "husbandorate"]:
waifu_text = "husbando"
@@ -289,16 +298,21 @@ class Fun:
@commands.command(aliases=["cf"])
async def coinflip(self, ctx):
"""
Flip a coin
Filps a magical digital coin!
"""
return await ctx.send("The coin landed on {}!".format(random.choice(["heads", "tails"])))

@commands.command(aliases=["ae", "aesthetic"])
async def aesthetics(self, ctx, *, convert):
"""Converts text to be more a e s t h e t i c s"""
async def aesthetics(self, ctx, *, text):
"""Converts text to be more a e s t h e t i c

Example:
# Convert "Hello World" to fixed-width text.
;ae Hello World
"""
wide_map = dict((i, i + 0xFEE0) for i in range(0x21, 0x7F)) # Create dict with fixed width equivalents for chars
wide_map[0x20] = 0x3000 # replace space with 'IDEOGRAPHIC SPACE'
converted = str(convert).translate(wide_map)
converted = str(text).translate(wide_map)
output = await ctx.send(converted)

logging = roxbot.guild_settings.get(ctx.guild)["logging"]
@@ -330,7 +344,7 @@ class Fun:

@commands.command(aliases=["otd"])
async def onthisday(self, ctx):
"""Returns a fact that happened on this day."""
"""Returns a random fact of something that happened today!"""
base_url = "http://numbersapi.com/"
day = datetime.datetime.today().day
month = datetime.datetime.today().month
@@ -348,7 +362,12 @@ class Fun:

@commands.command(aliases=["nf"])
async def numberfact(self, ctx, number=-54):
"""Returns a fact for the positive integer given. A random number is chosen if none is given."""
"""Returns a fact for the positive integer given. A random number is chosen if none is given.

Example:
# Random fact for the number 35
;nf 35
"""
base_url = "http://numbersapi.com/"
if number < 0:
endpoint = "/random/?json"
@@ -442,10 +461,11 @@ class Fun:
@commands.command(aliases=["za"])
async def zalgo(self, ctx, *, text):
"""
Returns Z͇͇͋Á͇͇L͇͔͇G̛͇͇O͇͇͜
:param ctx:
:param text:
:return:
Sends text to the nether and returns it back to you ̭҉̭̭ͭi̭͎̭ṋ̭̀҈̭̭̋ ̭͉̭z̭̩̭a̭̭̽ḽ̦̭g̭̞̭o̭̤̭ ̭̭͑f̭̻̭o̭̭͢r̭̭̀m̭̭ͮ
Example:
# Convert "Hello World" to zalgo.
;zalgo Hello World
"""
intensity = 10
zalgo_chars = [*[chr(i) for i in range(0x0300, 0x036F + 1)], *[u'\u0488', u'\u0489']]
@@ -474,6 +494,7 @@ class Fun:

@commands.command(aliases=["rf", "roxfacts", "roxfact"])
async def roxbotfact(self, ctx):
"""Returns a random fact about Roxbot! Roxbot has her own lore that you can discover through out these facts. Written especially for Roxbot."""
# Roxbot fact cache
if isinstance(ctx.channel, discord.DMChannel):
cache_id = ctx.author.id

+ 1
- 0
roxbot/cogs/nsfw.py View File

@@ -40,6 +40,7 @@ def tag_blacklist(guild):


class NFSW():
"""The NSFW cog is a collection of commands that post images from popular NSFW sites. """
def __init__(self, bot_client):
self.bot = bot_client
self.cache = {}

+ 1
- 1
roxbot/cogs/util.py View File

@@ -33,7 +33,7 @@ import roxbot

class Util():
"""
A cog that offers utility commands.
The Util cog is a cog filled with a number of utility commands to help more advanced users of Discord.
"""
def __init__(self, bot_client):
self.bot = bot_client

+ 1
- 0
roxbot/cogs/voice.py View File

@@ -159,6 +159,7 @@ class YTDLSource(discord.PCMVolumeTransformer):


class Voice:
"""The Voice cog is a cog that adds and manages a fully-functional music bot for Roxbot."""
def __init__(self, bot):
# Auto Cleanup cache files on boot
self._clear_cache()

Loading…
Cancel
Save