Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formalise Docs #26

Merged
merged 18 commits into from
Apr 15, 2023
14 changes: 7 additions & 7 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# MeowerBot.py Docs
# MeowerBot.py Documentation

<!-- warning -->
<table><td>:warning: These docs assume you actualy are fairly competent in python. Or have atleast learned OOP. </td></table>
<table><td>:warning: This documentation assumes you are competent in python, or have at least learned Object-oriented programming.</td></table>

This guide is for MeowerBot.py v2.5.0

- [refrence](./refrence/)
- [methods](./refrence/methods/) (only including cuz important)
- [tutorial](./tutorial/)
- [Reference](./refrence/)
- [methods](./refrence/methods/)
- [Tutorial](./tutorial/)

## What is MeowerBot.py?

MeowerBot.py is a Bot library for https://meower.org (open source at https://github.com/meower-media-co/)
MeowerBot.py is a bot library for https://meower.org (open source at https://github.com/meower-media-co/)

MeowerBot.py itself is located at https://github.com/meower-community/MeowerBot.py
MeowerBot.py it self is located at https://github.com/meower-community/MeowerBot.py

8 changes: 4 additions & 4 deletions docs/refrence/callbacks/close.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<p align="center">
<h1> close callback </h1>
<h1>Close callback</h1>
</p>

This callback gets called when the bot`s wss closes
This callback gets called when websocket for the bot is closed.

## args
## Arguments
- bot: MeowerBot.Bot

## example
## Example Code

```py

Expand Down
10 changes: 5 additions & 5 deletions docs/refrence/callbacks/error.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<p align="center">
<h1> # Error Callback </h1>
<h1>Error Callback</h1>
</p>
This callback gets called when an exception gets raised.
This callback is called when an exception is raised.

## args
## Arguments

- error: Exception
The error that caused this callback to get called
The error that caused the error callback to be called.


- bot: MeowerBot.Bot

## example
## Example Code

```py
import traceback
Expand Down
6 changes: 2 additions & 4 deletions docs/refrence/callbacks/index.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<p align="center">
<h1> callbacks </h1>
<h1>Callbacks</h1>
</p>
the meat and butter of the control over your bot.

this is an index page, the main pages are
This is an index page. Here is a list of the subpages:

- 1. [close](./close.md)
- 2. [error](./error.md)
Expand Down
8 changes: 4 additions & 4 deletions docs/refrence/callbacks/login.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<p align="center">
<h1> # Login Callback </h1>
<h1>Login Callback </h1>
</p>

This callback gets called when the bot has fully logged in
This callback gets called when the bot has fully logged in.

## args
## Arguments

### bot

A required keyword argument.

The bot object

## example
## Example code

```py

Expand Down
12 changes: 6 additions & 6 deletions docs/refrence/callbacks/message.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<p align="center">
<h1> callback message </h1>
<h1>Callback message</h1>
</p>

The callback `message` is the gateway into making your own prefix style/ ban system
The callback `message` is the gateway into making your own prefix style/ban system

## arguments
## Arguments

- msg: [Post](../types/Post.md)
This object is a Post object containing everything the post has to offer
This object is a post object containing everything the post has to offer


## example
## Example code

```py
from MeowerBot import Bot
Expand All @@ -32,4 +32,4 @@ def on_message(message, bot=bot):
bot.callback(on_message, cbid="message")

...
```
```
8 changes: 4 additions & 4 deletions docs/refrence/callbacks/raw.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

the callback that gets triggered without editing the post at all.

equivelent to MeowerBot 1.x.x on_msg
This acts the same as `on_msg in MeowerBot 1.x.x

## args
## Arguments

### Bot

Expand All @@ -17,7 +17,7 @@ Required Keyword argument
The raw post object that is given by the Meower Server


## example
## Example Code

```py
from MeowerBot import Bot
Expand All @@ -31,4 +31,4 @@ def raw_post(post, bot=bot):
print(f"{post['u']}: {post['p']}")

bot.listener(raw_post, cbid="__raw__")
```
```
16 changes: 8 additions & 8 deletions docs/refrence/commands.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<p align="center"><h1>Commands Refrence<h1></p>
<p align="center"><h1>Commands Reference<h1></p>

this applys both to :meth: `MeowerBot.Bot.command`, and :func: `MeowerBot.command.command`
This applies to both :meth: `MeowerBot.Bot.command` and :func: `MeowerBot.command.command`

creating a command returns a :obj: `MeowerBot.command.AppCommand`. replacing your function
Creating a command returns a :obj: `MeowerBot.command.AppCommand`, replacing your function

## args
# Arguments

- name: str (or aname in bot.command, because breaking change i dont wanna make.)
- name: str (or aname in bot.command, because there is a breaking change I do not want to make.)
the name of the command

- args: int
Expand All @@ -17,11 +17,11 @@ creating a command returns a :obj: `MeowerBot.command.AppCommand`. replacing you

# Subcommands

A subcommand is a command that basicly takes the first argument as the command name, and the rest as the arguments.
A subcommand is a command that takes the first argument as the command name and the rest as arguments.

This makes it easy to make a command that has multiple subcommands. And have subcommands that have subcommands as they are the same as normal commands, but are handled by the parent command.

## args
## Arguments
- name: str
the name of the command

Expand All @@ -31,7 +31,7 @@ This makes it easy to make a command that has multiple subcommands. And have sub
if the command takes infinite arguments use 0.


## example
## Example Code

```py

Expand Down
4 changes: 2 additions & 2 deletions docs/refrence/index.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<p align="center">
<h1>Refrences</h1>
<h1>References</h1>
</p>

This is the index of refrences. To learn more go to the two sub folders
This is the index of the references page. To learn more, go to one of the two sub-folders.

- 1. [callbacks](./callbacks/)
- 2. [types](./types/)
Expand Down
10 changes: 5 additions & 5 deletions docs/refrence/methods/command.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# command
# Command

This method is used to create a command in a cog.

## args
## Arguments

- name: str
The name of the command
Expand All @@ -14,7 +14,7 @@ This method is used to create a command in a cog.
If the command takes infinite arguments use 0.


## example
## Example Code

```py

Expand All @@ -36,7 +36,7 @@ class MyCog(Cog):

This method is used to create a subcommand in a cog.

## args
## Arguments

- name: str
The name of the command
Expand All @@ -48,7 +48,7 @@ This method is used to create a subcommand in a cog.
If the command takes infinite arguments use 0.


## example
## Example code

```py

Expand Down
6 changes: 3 additions & 3 deletions docs/refrence/types/Post.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<h1> Post object </h1>
</p>

## attributes
## Attributes

- ctx: a [mb.context.CTX](./ctx.md) object

Expand All @@ -11,9 +11,9 @@
The post author.

- chat: str
the id of the chat the post was sent in
The ID of the chat where the post was made

- type: int

- date: datetime.datetime object
the time and date the post was created
The exact date and time at which the post was created.
12 changes: 6 additions & 6 deletions docs/refrence/types/ctx.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@
<h1>CTX object</h1>
</p>

## attributes
## Attributes

- user: [User](./user.md)
The post author.

- message: a [mb.context.Post](./Post.md) object
- message: A [mb.context.Post](./Post.md) object.

## methods
## Methods

### send_message

#### args
#### Arguments

- message: the thing you want to send

### reply

#### args
#### Arguments

- message: str
The thing you want to send.
The content of the post to send.
4 changes: 2 additions & 2 deletions docs/refrence/types/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

</p>

all of the MeowerBot.py public types
All of the MeowerBot.py public types

this is an index page, the main files are below
This is an index page, the main files are below

- 1. [ctx](./ctx.md)
- 2. [Post](./Post.md)
Expand Down
12 changes: 6 additions & 6 deletions docs/refrence/types/user.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<p align="center">
<h1> User Object </h1>
<h1>User Object </h1>
</p>

## attributes
## Attributes

- username: the username of this user
- level: the moderation level of a user
- pfp: the profile picture that a user is using
- quote: the quote a user set for themselves
- username: The username of a specified user
- level: The moderation level of a specified user
- pfp: The profile picture of a specified user
- quote: The quote of a specified user
Loading