A meower bot lib for py
Project description
MeowerBot.py
A Python Bot library with an API like nextcord or discord.py, but instead of discord, it is made for the FOSS Social media Meower
Examples
from MeowerBot import Bot
from MeowerBot.context import Context
from MeowerBot.cog import Cog
from MeowerBot.command import command
import logging
from dotenv import load_dotenv # type: ignore
load_dotenv() # type: ignore
from os import environ as env
from MeowerBot.ext.help import Help as HelpExt
logging.basicConfig(level=logging.DEBUG)
logging.getLogger("websockets.client").setLevel(level=logging.INFO)
bot = Bot()
@bot.event
async def login(t):
print("Logged in!")
@bot.command(name="ping")
async def ping(ctx: Context):
await ctx.send_msg("Pong!\n My latency is: " + str(bot.latency))
@ping.subcommand(name="pong")
async def pong(ctx: Context, *message: str):
await ctx.send_msg(f"Pong!{" ".join(message)}")
class Ping(Cog):
def __init__(self, bot: Bot):
super().__init__()
self.bot = bot
@command()
async def cog_ping(self, ctx: Context):
await ctx.send_msg("Pong!\n My latency is: " + str(self.bot.latency))
@cog_ping.subcommand()
async def ping(self, ctx: Context):
await ctx.send_msg("Pong!\n My latency is: " + str(self.bot.latency))
bot.register_cog(Ping(bot))
bot.register_cog(HelpExt(bot, disable_command_newlines=True))
bot.run(env["uname"], env["pswd"])
That example may be outdated. If it is outdated, the correct version is here
Extra links
There are extra examples here The docs are located on my domain made with sphinx. They are located here MeowerBot.py's LICENSE
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
meowerbot-3.3.0.tar.gz
(29.7 kB
view hashes)
Built Distribution
meowerbot-3.3.0-py3-none-any.whl
(19.0 kB
view hashes)
Close
Hashes for meowerbot-3.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3432a01c732ec9281d7256eb8b7abbb6c15f168ff0b355a9f1d8ed3f5c1c6429 |
|
MD5 | 3e264987475a755ce517dbc389c6b21e |
|
BLAKE2b-256 | 22f1a9546cd3877212e832ad368b253d30143af80fc3d2cc64782b42421ffb0d |