Skip to main content

Python Misskey Bot Framework

Project description

MiPA

Discord server invite Ruff

Overview

日本語版

MiPA is a Misskey Bot Framework created to allow for Discord.py-like coding.

About MiPAC

The API wrapper functionality provided by MiPA is managed by a library called MiPAC. Since the amount of work is significantly higher than that of MiPA, we are looking for people to work with us.

Supported Misskey Versions

Examples

import asyncio

from aiohttp import ClientWebSocketResponse
from mipac.models.note import Note

from mipa.ext.commands.bot import Bot


class MyBot(Bot):
    def __init__(self):
        super().__init__()

    async def _connect_channel(self):
      await self.router.connect_channel(['main', 'home'])

    async def on_ready(self, ws: ClientWebSocketResponse):
        await self._connect_channel()
        print('Logged in ', self.user.username)

    async def on_reconnect(self, ws: ClientWebSocketResponse):
        await self._connect_channel()

    async def on_note(self, note: Note):
        print(note.author.username, note.content)


if __name__ == '__main__':
    bot = MyBot()
    asyncio.run(bot.start('wss://example.com/streaming', 'your token here'))

For more examples, please see the examples folder. If you don't know how to do what you want in the examples, please feel free to create an issue.

LICENSE

This project is provided under the MIT LICENSE.

MiPA has been inspired by Discord.py in many ways. Therefore, in places where we use the source code of Discord.py, we specify the license of Discord.py at the beginning of the file. Please check the code for details.

FOSSA Status

Special Thanks

  • Discord.py
    • We have been inspired by many aspects of Discord.py, such as the mechanism of Cogs and the management of tasks and states.

Documentation * Discord Server

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mipa-0.4.2.tar.gz (37.1 kB view details)

Uploaded Source

Built Distribution

mipa-0.4.2-py3-none-any.whl (29.5 kB view details)

Uploaded Python 3

File details

Details for the file mipa-0.4.2.tar.gz.

File metadata

  • Download URL: mipa-0.4.2.tar.gz
  • Upload date:
  • Size: 37.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.19

File hashes

Hashes for mipa-0.4.2.tar.gz
Algorithm Hash digest
SHA256 f81e7d8e44ff2e8f20f92f81256490c81a8a7123c23964a5cb3146afea7d2e92
MD5 3474f9edb593cd486ee4a4cde82b0eeb
BLAKE2b-256 9452f37e8053c260077e16ca65fd2b403f22175408858a64dd118c66cceda9e2

See more details on using hashes here.

File details

Details for the file mipa-0.4.2-py3-none-any.whl.

File metadata

  • Download URL: mipa-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 29.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.19

File hashes

Hashes for mipa-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0c3581c3666331022a525b6d8b57789ce6d0835e71c1ee10c4048ce481e449f3
MD5 a8c7ddfe7f04bb2393272a7be4eb64e3
BLAKE2b-256 4c962f8b6559c0cc70d5f8a180db23ee3da1b7aac4bde97ecfc092ca76d6b2ff

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page