MeowerBot package
Subpackages
Submodules
- MeowerBot.bot module
Bot
Bot.BOT_NO_PMSG_RESPONSE
Bot.api
Bot.cache
Bot.callbacks
Bot.cogs
Bot.command()
Bot.direct()
Bot.disconnect()
Bot.error()
Bot.event()
Bot.get_chat()
Bot.get_context()
Bot.handle_bot_pmsg()
Bot.handle_bridges()
Bot.latency
Bot.listen()
Bot.login()
Bot.message()
Bot.password
Bot.raw_message()
Bot.register_cog()
Bot.run()
Bot.run_commands()
Bot.sendPacket()
Bot.server
Bot.start()
Bot.statuscode()
Bot.ulist()
Bot.update_commands()
Bot.user
Bot.userlist
Bot.username
Bot.ws
CallBackIds
cbids
- MeowerBot.cog module
- MeowerBot.command module
- MeowerBot.context module
Module contents
MeowerBot.py
MIT License
- class MeowerBot.Bot(prefix=None)[source]
Bases:
Client
A class that holds all the networking for a Meower bot to function and run
- BOT_NO_PMSG_RESPONSE = ['I:500 | Bot', 'I: 500 | Bot', 'I: 100 | Bot', 'I: 100 | Bot']
- cache: Cache
- async disconnect()[source]
Gets called when the bot gets disconnected from meower
This is a callback for
MeowerBot.bot.Bot.event()
- async error(err: Exception)[source]
Handles errors for the bot.
This is a callback for
MeowerBot.bot.Bot.event()
- event(func: Callable)[source]
Creates a callback that takes over the original functionality of the bot.
Valid callbacks are defined in
CallBackIds
- Parameters:
func (Callable) – The callback function
- Raises:
TypeError – The func provided does not have a valid callback name
- property latency: float
Gets the latency of the bot
- Returns:
Bot latency
- Return type:
int
- listen(callback: str | None = None)[source]
Does the same thing as :meth MeowerBot.bot.Bot.event:but does not replace the bot’s original functionality
Valid callbacks are defined in
CallBackIds
:raises TypeError: The listener provided is not valid
- async login(token: str)[source]
Gets called when the bot is fully ready and logged into meower
This is a callback for
MeowerBot.bot.Bot.event()
- async message(message: Post)[source]
Method for overiding how the bot handles messages.
This is a callback for
MeowerBot.bot.Bot.event()
- async ulist(ulist: List[str])[source]
Gets called when a user connects to meower.
This is a callback for
MeowerBot.bot.Bot.event()
- user: PartialUser | User
- userlist: List[str]
- class MeowerBot.CallBackIds(value, names=None, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
StrEnum
Callbacks that the bot calls. You can find more documentation in
MeowerBot.bot.Bot
- direct = 'direct'
- disconnect = 'disconnect'
- error = 'error'
- login = 'login'
- message = 'message'
- raw_message = 'raw_message'
- statuscode = 'statuscode'
- ulist = 'ulist'
- MeowerBot.cbids
alias of
CallBackIds