From e12dc1a43810419b171b52fc6d0111be0aaa043f Mon Sep 17 00:00:00 2001 From: Josh <72828296+JoshAtticus@users.noreply.github.com> Date: Sat, 15 Apr 2023 11:02:24 +0800 Subject: [PATCH 01/18] Update index.md Signed-off-by: Josh <72828296+JoshAtticus@users.noreply.github.com> --- docs/index.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/index.md b/docs/index.md index 4f20319..14d9962 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,17 +1,17 @@ -# MeowerBot.py Docs +# MeowerBot.py Documentation -
:warning: These docs assume you actualy are fairly competent in python. Or have atleast learned OOP.
+
:warning: This documentation assumes you are competent in python, or have at least learned Object-oriented programming.
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 From f177982317f96aee23b38aae6ba58e28452bd332 Mon Sep 17 00:00:00 2001 From: Josh <72828296+JoshAtticus@users.noreply.github.com> Date: Sat, 15 Apr 2023 11:03:36 +0800 Subject: [PATCH 02/18] Update index.md Signed-off-by: Josh <72828296+JoshAtticus@users.noreply.github.com> --- docs/refrence/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/refrence/index.md b/docs/refrence/index.md index 6b871e2..9b67ec9 100644 --- a/docs/refrence/index.md +++ b/docs/refrence/index.md @@ -1,8 +1,8 @@

-

Refrences

+

References

-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/) From 3a4bd11d83a6b5e7bb1f0544d83cdf92b72376f2 Mon Sep 17 00:00:00 2001 From: Josh <72828296+JoshAtticus@users.noreply.github.com> Date: Sat, 15 Apr 2023 11:05:58 +0800 Subject: [PATCH 03/18] Update commands.md Signed-off-by: Josh <72828296+JoshAtticus@users.noreply.github.com> --- docs/refrence/commands.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/refrence/commands.md b/docs/refrence/commands.md index c4b6498..57a2769 100644 --- a/docs/refrence/commands.md +++ b/docs/refrence/commands.md @@ -1,12 +1,12 @@ -

Commands Refrence

+

Commands Reference

-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 a name in bot.command, because there is a breaking change I do not want to make.) the name of the command - args: int @@ -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 @@ -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 From d86b89aaca1ce6875818b303d34076ce98993702 Mon Sep 17 00:00:00 2001 From: Josh <72828296+JoshAtticus@users.noreply.github.com> Date: Sat, 15 Apr 2023 11:06:46 +0800 Subject: [PATCH 04/18] Update Post.md Signed-off-by: Josh <72828296+JoshAtticus@users.noreply.github.com> --- docs/refrence/types/Post.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/refrence/types/Post.md b/docs/refrence/types/Post.md index 6d6e954..6478292 100644 --- a/docs/refrence/types/Post.md +++ b/docs/refrence/types/Post.md @@ -2,7 +2,7 @@

Post object

-## attributes +## Attributes - ctx: a [mb.context.CTX](./ctx.md) object @@ -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. From 6a016cfbca312f6f127c8b3e867a519899d3ca7b Mon Sep 17 00:00:00 2001 From: Josh <72828296+JoshAtticus@users.noreply.github.com> Date: Sat, 15 Apr 2023 11:07:59 +0800 Subject: [PATCH 05/18] Update ctx.md Signed-off-by: Josh <72828296+JoshAtticus@users.noreply.github.com> --- docs/refrence/types/ctx.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/refrence/types/ctx.md b/docs/refrence/types/ctx.md index a5f408e..ada2ca2 100644 --- a/docs/refrence/types/ctx.md +++ b/docs/refrence/types/ctx.md @@ -2,24 +2,24 @@

CTX object

-## 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. \ No newline at end of file + The content of the post to send. From 8897315a202712ba47222275dc7c9b0743aa31ea Mon Sep 17 00:00:00 2001 From: Josh <72828296+JoshAtticus@users.noreply.github.com> Date: Sat, 15 Apr 2023 11:08:13 +0800 Subject: [PATCH 06/18] Update index.md Signed-off-by: Josh <72828296+JoshAtticus@users.noreply.github.com> --- docs/refrence/types/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/refrence/types/index.md b/docs/refrence/types/index.md index c2f766f..e350bdc 100644 --- a/docs/refrence/types/index.md +++ b/docs/refrence/types/index.md @@ -3,9 +3,9 @@

-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) From 6de969e8ff703e2fe31791b7d731f1b5ff156e38 Mon Sep 17 00:00:00 2001 From: Josh <72828296+JoshAtticus@users.noreply.github.com> Date: Sat, 15 Apr 2023 11:09:07 +0800 Subject: [PATCH 07/18] Update user.md Signed-off-by: Josh <72828296+JoshAtticus@users.noreply.github.com> --- docs/refrence/types/user.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/refrence/types/user.md b/docs/refrence/types/user.md index 87fafb7..108696d 100644 --- a/docs/refrence/types/user.md +++ b/docs/refrence/types/user.md @@ -1,10 +1,10 @@

-

User Object

+

User Object

-## 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 From e6310590b85661141758ce9435b5e1131e47822d Mon Sep 17 00:00:00 2001 From: Josh <72828296+JoshAtticus@users.noreply.github.com> Date: Sat, 15 Apr 2023 11:10:02 +0800 Subject: [PATCH 08/18] Update command.md Signed-off-by: Josh <72828296+JoshAtticus@users.noreply.github.com> --- docs/refrence/methods/command.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/refrence/methods/command.md b/docs/refrence/methods/command.md index 0e5acbf..a5af11f 100644 --- a/docs/refrence/methods/command.md +++ b/docs/refrence/methods/command.md @@ -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 @@ -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 @@ -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 @@ -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 From 9f1f48a2fd0abe7b38c103b0315f1b32047e55e0 Mon Sep 17 00:00:00 2001 From: Josh <72828296+JoshAtticus@users.noreply.github.com> Date: Sat, 15 Apr 2023 11:11:01 +0800 Subject: [PATCH 09/18] Update raw.md Signed-off-by: Josh <72828296+JoshAtticus@users.noreply.github.com> --- docs/refrence/callbacks/raw.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/refrence/callbacks/raw.md b/docs/refrence/callbacks/raw.md index bf9998c..97b01e4 100644 --- a/docs/refrence/callbacks/raw.md +++ b/docs/refrence/callbacks/raw.md @@ -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 @@ -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 @@ -31,4 +31,4 @@ def raw_post(post, bot=bot): print(f"{post['u']}: {post['p']}") bot.listener(raw_post, cbid="__raw__") -``` \ No newline at end of file +``` From 7fd33817620e603815348bd73240f8fa8ecf69bb Mon Sep 17 00:00:00 2001 From: Josh <72828296+JoshAtticus@users.noreply.github.com> Date: Sat, 15 Apr 2023 11:11:43 +0800 Subject: [PATCH 10/18] Update message.md Signed-off-by: Josh <72828296+JoshAtticus@users.noreply.github.com> --- docs/refrence/callbacks/message.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/refrence/callbacks/message.md b/docs/refrence/callbacks/message.md index 23ecea3..d5ded91 100644 --- a/docs/refrence/callbacks/message.md +++ b/docs/refrence/callbacks/message.md @@ -1,16 +1,16 @@

-

callback message

+

Callback message

-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 @@ -32,4 +32,4 @@ def on_message(message, bot=bot): bot.callback(on_message, cbid="message") ... -``` \ No newline at end of file +``` From 5df84bce660047d44a580d913c8b7c6f31301564 Mon Sep 17 00:00:00 2001 From: Josh <72828296+JoshAtticus@users.noreply.github.com> Date: Sat, 15 Apr 2023 11:12:07 +0800 Subject: [PATCH 11/18] Update login.md Signed-off-by: Josh <72828296+JoshAtticus@users.noreply.github.com> --- docs/refrence/callbacks/login.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/refrence/callbacks/login.md b/docs/refrence/callbacks/login.md index 4f188bf..1bd8902 100644 --- a/docs/refrence/callbacks/login.md +++ b/docs/refrence/callbacks/login.md @@ -1,10 +1,10 @@

-

# Login Callback

+

Login Callback

-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 @@ -12,7 +12,7 @@ A required keyword argument. The bot object -## example +## Example code ```py From 917ec0999cf94d948d4f5889d54f86376797e110 Mon Sep 17 00:00:00 2001 From: Josh <72828296+JoshAtticus@users.noreply.github.com> Date: Sat, 15 Apr 2023 11:12:53 +0800 Subject: [PATCH 12/18] Update index.md Signed-off-by: Josh <72828296+JoshAtticus@users.noreply.github.com> --- docs/refrence/callbacks/index.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/refrence/callbacks/index.md b/docs/refrence/callbacks/index.md index 9af1b81..0ef9c63 100644 --- a/docs/refrence/callbacks/index.md +++ b/docs/refrence/callbacks/index.md @@ -1,9 +1,7 @@

-

callbacks

+

Callbacks

-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) From cccb16b438cc4202d22f69e5ea1be913d218176d Mon Sep 17 00:00:00 2001 From: Josh <72828296+JoshAtticus@users.noreply.github.com> Date: Sat, 15 Apr 2023 11:13:42 +0800 Subject: [PATCH 13/18] Update error.md Signed-off-by: Josh <72828296+JoshAtticus@users.noreply.github.com> --- docs/refrence/callbacks/error.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/refrence/callbacks/error.md b/docs/refrence/callbacks/error.md index c395a5d..6fe53a0 100644 --- a/docs/refrence/callbacks/error.md +++ b/docs/refrence/callbacks/error.md @@ -1,17 +1,17 @@

-

# Error Callback

+

Error Callback

-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 From 57fce70eca2a6bf3f764109c44ffaed58ca3b4b6 Mon Sep 17 00:00:00 2001 From: Josh <72828296+JoshAtticus@users.noreply.github.com> Date: Sat, 15 Apr 2023 11:14:26 +0800 Subject: [PATCH 14/18] Update close.md Signed-off-by: Josh <72828296+JoshAtticus@users.noreply.github.com> --- docs/refrence/callbacks/close.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/refrence/callbacks/close.md b/docs/refrence/callbacks/close.md index 957d869..343129f 100644 --- a/docs/refrence/callbacks/close.md +++ b/docs/refrence/callbacks/close.md @@ -1,13 +1,13 @@

-

close callback

+

Close callback

-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 From c9e427f7aa1d95f0b0691d8e0336612c3a0ef634 Mon Sep 17 00:00:00 2001 From: Josh <72828296+JoshAtticus@users.noreply.github.com> Date: Sat, 15 Apr 2023 11:18:12 +0800 Subject: [PATCH 15/18] Update callbacks.md Signed-off-by: Josh <72828296+JoshAtticus@users.noreply.github.com> --- docs/tutorial/callbacks.md | 41 +++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/docs/tutorial/callbacks.md b/docs/tutorial/callbacks.md index 97ad7dc..b8e4a7e 100644 --- a/docs/tutorial/callbacks.md +++ b/docs/tutorial/callbacks.md @@ -2,16 +2,15 @@ A callback is a function that gets called when a certain event happens. -That makes it so you can recieve events from meower, and do stuff with them. +That makes it so you can recieve events from Meower, and do stuff with them. -## the login callback - -This callback is for when the bot logs in. You can use it to do stuff like send a message on startup. However if the bot fails to login, this callback will not get called. +## Login callback +This callback is for when the bot logs in. You can use it, for example, to send a message on startup or run a local command. If the bot fails to login, this callback will not be called. There is more info on the login callback [here](../refrence/callbacks/login.md) -### an example +### Example code ```py from MeowerBot import Bot @@ -25,18 +24,18 @@ bot.callback(login, cbid="login") # If the cbid is not specifed, it will use the ``` -## the error callback +## Error Callback This callback is for when an error happens. It is used for sending a message when an error happens, or for logging errors (However MeowerBot.py already logs errors, so you don't need to do that) There is more info on the error callback [here](../refrence/callbacks/error.md) -### arguments +### Arguments - e: Exception - - The error that caused this callback to get called + - The error that caused this callback to be called -### an example +### Example code ```py from MeowerBot import Bot @@ -50,13 +49,13 @@ bot.callback(error, cbid="error") # If the cbid is not specifed, it will use the ``` -## the close callback +## Close callback -This callback gets called when the websocket is fully closed, and the bot is no longer connected to meower. The only way to send a message after this callback is called is to reconnect the bot, or use `https://webhooks.meower.org/post/home` to send a message. +This callback gets called when the websocket for the bot is fully closed and the bot is no longer connected to Meower. The only way to send a message after this callback is called is to reconnect the bot or use `https://webhooks.meower.org/post/home` to send a message. There is more info on the close callback [here](../refrence/callbacks/close.md) -### an example +### Example code ```py from MeowerBot import Bot @@ -70,23 +69,23 @@ bot.callback(close, cbid="close") # If the cbid is not specifed, it will use the ``` -## the message callback +## Message callback -This callback gets called when a message is sent in a place the bot can see. This includes home, and livechat. +This callback is called when a message is sent in a place the bot can see. This includes home, livechat and group chats that the bot has been added to. There is more info on the message callback [here](../refrence/callbacks/message.md) -Although be warned, the default implementation is desabled when this callback is added, so you will need to do that yourself. +Although be warned, the default implementation is disabled when this callback is added, so you will need to do that yourself. -### arguments +### Arguments - message: MeowerBot.Message - The message that was sent -### an example +### Example code ```py from MeowerBot import Bot @@ -109,13 +108,13 @@ bot.callback(message, cbid="message") # If the cbid is not specifed, it will use ``` -## The cloudlink packet callback. +## Cloudlink Packet callback -This callback gets called when a message is sent. However this time it is a raw packet, and not a message object. Good for mb.py 1.0.0 enjoyers. +This callback gets called when a message is sent. However this time it is a raw packet, and not a message object. Good for MeowerBot.py 1.x.x enjoyers. There is more info on the cloudlink packet callback [here](../refrence/callbacks/raw.md) -### arguments +### Argumentx - message: dict[str, any] - The packet that was recieved @@ -131,7 +130,7 @@ There is more info on the cloudlink packet callback [here](../refrence/callbacks } ``` -### an example +### Example code ```py from MeowerBot import Bot From cce56214df2677f6c994b318d85c00668e1299a9 Mon Sep 17 00:00:00 2001 From: Josh <72828296+JoshAtticus@users.noreply.github.com> Date: Sat, 15 Apr 2023 11:18:53 +0800 Subject: [PATCH 16/18] Update cogs.md Signed-off-by: Josh <72828296+JoshAtticus@users.noreply.github.com> --- docs/tutorial/cogs.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/docs/tutorial/cogs.md b/docs/tutorial/cogs.md index 5a6ef4c..4a09020 100644 --- a/docs/tutorial/cogs.md +++ b/docs/tutorial/cogs.md @@ -1,11 +1,11 @@

MeowerBot Cogs

-MeowerBot cogs are basicly just commands that are in a class. +MeowerBot cogs are commands that are in a class. The name of the class is the name of the cog. -you need diffrent imports for deeling with cogs +You need diffrent imports for dealing with cogs. ```py # cog.py @@ -24,9 +24,7 @@ class YourCog(Cog): ``` -The commands are basicly the same for `bot.command` - -you just use the imported `command` decorateor insted +The commands are basicly the same for `bot.command`, you just use the imported `command` decorateor insted ```py #cogs.py From 19cf45de53b0ceb2c3ac46c81201bf64d3a7ea4e Mon Sep 17 00:00:00 2001 From: Josh <72828296+JoshAtticus@users.noreply.github.com> Date: Sat, 15 Apr 2023 11:21:38 +0800 Subject: [PATCH 17/18] Update setting_up.md Signed-off-by: Josh <72828296+JoshAtticus@users.noreply.github.com> --- docs/tutorial/setting_up.md | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/docs/tutorial/setting_up.md b/docs/tutorial/setting_up.md index d3727b8..42dd5f6 100644 --- a/docs/tutorial/setting_up.md +++ b/docs/tutorial/setting_up.md @@ -13,7 +13,7 @@ pip install MeowerBot MeowerBot.py is a simple library, with only a few chosen wrappers. -you start your bot with +You should start off your bot with ```py from MeowerBot import Bot @@ -21,7 +21,7 @@ from MeowerBot import Bot bot = Bot() ``` -Now there are some important callbacks, and systems that make your life alot more easy +There are some important callbacks, and systems that make developing a bot much easier. - 1. The command system @@ -47,24 +47,20 @@ def subcommand(ctx, name): - 2. The context system -The context system is MeowerBots way of abstracting raw websocket data, and commands from you. - -it consists of 3 main parts. +The context system is MeowerBot.py's way of processing raw websocket data and commands from you. It consists of 3 main parts. - 1. The CTX object - The Ctx object initilises everything else to do with CTX, and contains all the methods to send messages by default - - it makes multi chat work by default + The CTX object initilises everything else to do with CTX, and contains all the methods to send messages by default. It makes multiple chats work by default. - - 2. the User object - The user object stores all data the bot can get from a user, giving you the power to check whats there without having to set up a system to get that data, and then wait in your command + - 2. The user object + The user object stores all data the bot can get from a user, giving you the power to check what is there without having to set up a system to get that data, and then wait in your command - - 3. the post object - The Body of CTX. The message your bot is reacting to. + - 3. The post object + The Body of CTX, which is also the message your bot is replying to. -it is always activated everytime someone sends a post, that your bot receves +It is always activated everytime someone sends a post, that your bot receves

Next page -

\ No newline at end of file +

From c96dfba2ba16db21a3a83eec87949656bddc0da7 Mon Sep 17 00:00:00 2001 From: Josh <72828296+JoshAtticus@users.noreply.github.com> Date: Sat, 15 Apr 2023 11:31:21 +0800 Subject: [PATCH 18/18] Update commands.md Signed-off-by: Josh <72828296+JoshAtticus@users.noreply.github.com> --- docs/refrence/commands.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/refrence/commands.md b/docs/refrence/commands.md index 57a2769..4b5db66 100644 --- a/docs/refrence/commands.md +++ b/docs/refrence/commands.md @@ -6,7 +6,7 @@ Creating a command returns a :obj: `MeowerBot.command.AppCommand`, replacing you # Arguments - - name: str (or a name in bot.command, because there is a breaking change I do not want to 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