Skip to content
This repository has been archived by the owner on Dec 26, 2022. It is now read-only.

Pincer - 0.1.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@Sigmanificient Sigmanificient released this 31 Aug 16:13
· 2491 commits to main since this release

Note: This is still an early dev version!

  • Added an http client

Example
Adding a reaction to a message

import asyncio

from pincer.core.http import HTTPClient

client = HTTPClient("...")

CHANNEL_ID: int = ...
MESSAGE_ID: int = ...
REACTION: str = ...
# see: https://discord.com/developers/docs/resources/channel#get-channel


async def add_reaction() -> None:
    await client.put(
        f'channels/{CHANNEL_ID}/messages/{MESSAGE_ID}/reactions/{REACTION}/@me',
        {}
    )


def main() -> None:
    loop = asyncio.get_event_loop()
    loop.run_until_complete(add_reaction())


if __name__ == '__main__':
    main()