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

Releases: Pincer-org/Pincer

Pincer - 0.6.2 Command message object return + per guild commands and bugfixes

10 Sep 13:35
Compare
Choose a tag to compare
The package is currently within the planning phase

Message object + per guild commands

Implemented a message object which can be used to further customize your response, and set the ability to set per guild commands.

Example

Usage example:

@command(guild=728278830770290759)
async def private(self, message: str):
    return Message(message, flags=InteractionFlags.EPHEMERAL)

Pincer - 0.6.1 Command bugfixes

09 Sep 20:33
Compare
Choose a tag to compare
Pre-release
The package is currently within the planning phase

Command bugfixes

Resolved the following issues:

  • Empty parameter error
  • Reposting existing commands bug
  • General typo refactoring

Pincer - 0.6.0 Commands implementation

09 Sep 13:37
Compare
Choose a tag to compare
Pre-release
The package is currently within the planning phase

Version 0.6.0 is a major step in the development of the Pincer lib. With this version the library is actually usable (see example)

Command update

Features

  • argument parsing (w basic annotation)
  • Command code sync with Discord (command creation/update/deletion)
  • String command reply (which is currently required, but won't be in the future)
  • Implemented on_interaction_create event w Interaction object as parameter.

An implementation example:

from pincer import Client, command


class Bot(Client):
    @Client.event
    async def on_ready(self):
        print(f"Started client on {self.bot}\n"
              "Registered commands: " + ", ".join(self.chat_commands))

    @command(description="Say something as the bot!")
    async def say(self, message: str):
        return message

    @command(description="Add two numbers!")
    async def add(self, first: int, second: int):
        return f"The addition of `{first}` and `{second}` is `{first + second}`"


if __name__ == "__main__":
    Bot("XXXYOURBOTTOKENHEREXXX").run()

Pincer - 0.5.5 Objects Implementations

08 Sep 21:18
Compare
Choose a tag to compare
Pre-release
The package is currently within the planning phase

The 0.5.x version dont add any new feature, but implement the discordpy classes within the package.
Thoses will be very useful for the next versions

Classes

Current

APIObject, Channel, Emoji, Guild, Application, Sticker, Invite, Role, GuidMember, User, Member, Reaction, Ban, AuditLog, WelcomeScreen, StickerItem, StickerPack, Webhook,FollowedChannels, VoiceRegion, Attachement, GuildWidget, Overwrite, MessageReference, Mesage, ChannelMention, Thread, StageInstance, VoiceState, Interactions, Application commands, Button, Select Menu, Select Option

Other added features

  • import fix
  • code cleanup
  • docs generalization

Pincer - 0.5.4 Objects Implementations

08 Sep 21:13
145e6d2
Compare
Choose a tag to compare
Pre-release
The package is currently within the planning phase

The 0.5.x version dont add any new feature, but implement the discordpy classes within the package.
Thoses will be very useful for the next versions

Classes

Current

APIObject, Channel, Emoji, Guild, Application, Sticker, Invite, Role, GuidMember, User, Member, Reaction, Ban, AuditLog, WelcomeScreen, StickerItem, StickerPack, Webhook,FollowedChannels, VoiceRegion, Attachement, GuildWidget, Overwrite, MessageReference

Added

  • Mesage
  • ChannelMention
  • Thread
  • StageInstance
  • VoiceState
  • Interactions
  • Application commands
  • Button
  • Select Menu
  • Select Option

Other added features

  • improved doc
  • default lightmode in sphinx
  • code quality

Pincer - 0.5.3 Objects Implementations

08 Sep 21:05
Compare
Choose a tag to compare
Pre-release
The package is currently within the planning phase

The 0.5.x version dont add any new feature, but implement the discordpy classes within the package.
Thoses will be very useful for the next versions

Classes

Current

APIObject, Channel, Emoji, Guild, Application, Sticker, Invite, Role, Member, GuidMember, User, Member, Reaction, Ban, AuditLog, WelcomeScreen, StickerItem, StickerPack, Webhook

Added

  • FollowedChannels
  • VoiceRegion
  • Attachement
  • GuildWidget
  • Overwrite
  • MessageReference

Other added features

  • improved doc

Pincer 0.4.1 - Documentation Improvements

05 Sep 17:35
Compare
Choose a tag to compare

📌 Links

Join the Discord server: https://discord.gg/8WkYz3fNFm
The PyPI package: https://pypi.org/project/Pincer
Our website: https://pincer.dev
ReadTheDoc: https://pincer.readthedocs.io/en/latest/pincer.html

Current Features

  • Dispatcher
  • Logging
  • HTTP Client
  • Client base class
  • Basic events
  • Better documentation & sphinx ReadTheDoc

The documentation has been improved!

Client base class example:

from pincer.client import Bot

# Note that both `Bot` and `Client` are valid!
bot = Bot("...")
bot.run()

An example on the on_ready event

from time import perf_counter
from pincer.client import Client

client = Client("...")


@client.event
async def on_ready():
    print(f"Logged in as {client.bot} after {perf_counter()} seconds")


client.run()

Inherited client

You have the possibility to use your own class to inherit from the Pincer bot base.

class Bot(Client):

    def __init__(self) -> None:
        super(Bot, self).__init__(token='...')

    @Client.event
    async def on_ready(self) -> None:
        ...

See an advanced bot implementation:

https://github.com/Pincer-org/Pincer-bot

Advanced Usage

Warning: These features are meant for advanced developers to make early experimentation with Pincer.

Enable the debug mode

If you want to see everything that is happening under the hood,
either out of curiosity or to get a deeper insight into the implementation
of some features, we provide debug logging!

import logging

logging.basicConfig(level=logging.DEBUG)

Note: A lot of printing can happen, including sensitive information,
so make sure to be aware of what you're doing if you're enabling it!

Middleware

Within the version 0.4.0-dev, the middleware system has been re-created,
and now advanced users can utilize them; however, it should be done carefully.

A /say command early implementation using middleware

https://gist.github.com/Arthurdw/e110ebbdafca388722f25ddb79c1dfb8

Pincer - 0.5.2 Objects Implementations

08 Sep 20:54
Compare
Choose a tag to compare
Pre-release
The package is currently within the planning phase

The 0.5.x version dont add any new feature, but implement the discordpy classes within the package.
Thoses will be very useful for the next versions

Classes

Current

  • APIObject
  • Channel
  • Emoji
  • Guild
  • Application
  • Sticker
  • Invite
  • Role
  • Member
  • GuidMember
  • User
  • Member

Added

  • Reaction
  • Ban
  • AuditLog
  • WelcomeScreen
  • StickerItem & StickerPack
  • Webhook

Other added features

  • Using Snowflake Datatype
  • Autogenerated docs
  • OptionallyProvided & MISSING

Pincer - 0.5.1 Objects Implementations

08 Sep 21:00
Compare
Choose a tag to compare
Pre-release
The package is currently within the planning phase

The 0.5.x version dont add any new feature, but implement the discordpy classes within the package.
Thoses will be very useful for the next versions

Classes

  • APIObject
  • Channel
  • Emoji
  • Guild

Added

  • GuidMember
  • Role
  • Sticker
  • Application
  • Invite
  • User
  • Member

Pincer - 0.5.0 Objects Implementations

08 Sep 20:44
Compare
Choose a tag to compare
Pre-release
The package is currently within the planning phase

The 0.5.x version dont add any new feature, but implement the discordpy classes within the package.
Thoses will be very useful for the next versions

Classes

  • APIObject
  • Channel
  • Emoji
  • Guild