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

Releases: Pincer-org/Pincer

0.11.4 loop_for, wait_for & Speed up

18 Nov 08:48
2e9f919
Compare
Choose a tag to compare
Pre-release
  • Adding loop_for and wait_for event for the bot
  • Adding flash sub package to optimize asynchronous performances
  • Toggable command register behavior
  • Checking snowflake boundaries

Bug Fixes:

  • corrected route call for kick & ban methods
  • proper http closing when bot crash within it initialization

0.11.2 Command Fix

16 Nov 17:58
93093a3
Compare
Choose a tag to compare
0.11.2 Command Fix Pre-release
Pre-release

A bug fix introduced in 0.11.1 break command decorator

0.11.1 - Adding methods to the APIObjects

15 Nov 00:22
1bcf70a
Compare
Choose a tag to compare

What's Changed

  • Added me,hoisted_role, kick & ban to guild members
  • Added fetch_message
  • Added get_avatar_url & get_avatar to user
  • Major BugFixes

New Contributors

Full Changelog: 0.10.1...0.11.1

0.11.0 - Doc Rewrite & new methods

14 Nov 23:42
45df3f9
Compare
Choose a tag to compare
Pre-release

What's Changed

  • Adds UserMessage endspoints (Reactions, Edit, and Delete) by @Lunarmagpie in #157
  • ✨ Support Discord Gateway Event Compression by @mwath in #160
  • ✨ Guild registration, guild commands fix, interaction response methods, message delete_after and HTTPMeta rewrite, post_init automatic conversion, channel send & delete, add headers to http request by @Arthurdw in #158
  • ✨ Implement Guild Member Middleware by @Lunarmagpie in #162
  • ✅ Improve test coverage for core/Heartbeat.py (#121) by @gillesigot in #169
  • ✨ 🐛 new interaction features, bugfix and refactor by @Arthurdw in #167
  • 🐛 Pillow images can be sent in an interaction by @Lunarmagpie in #179
  • 📝 Upgrade docs by @ooliver1 in #155
  • ✨ Middleware addition by @Endercheif in #163
  • ✨ Add middleware by @beastmatser in #174
  • 🔖 0.10.1 - Doc Rewrite by @Sigmanificient in #213

New Contributors

Full Changelog: 0.9.3...0.10.1

0.10.0 - Bugfixes, ack, ctx, compression & more

07 Nov 19:14
c15675c
Compare
Choose a tag to compare
  • proper closing/restart
  • ack & ctx interaction
  • Descripted annotation
  • Type Casting
  • Gateway compression
  • Guild member middleware
  • New str defaults
  • Invite link property
  • Message delete_after
  • Guild registeration
  • Discord changes
  • Emoji reaction functions
  • BugFixes

0.9.3 - Bugfixes, multiple event listeners & performance improvements.

18 Oct 19:53
Compare
Choose a tag to compare

Changes

  • Added the ability to register events multiple times. (except for the on_command_error event to prevent conflicts)
  • Iteration improvements

Bugfixes

  • Resolved the issue where already existing global commands were not being removed

0.9.2 - New command argument types and bugfixes

14 Oct 09:44
Compare
Choose a tag to compare

Just a generic patch, with some important bugfixes and useful new command argument types

Changes

  • Changed to LF file endings.
  • Internal refactoring
  • Documentation updates/typo fixes
  • Added float, User, Channel and Role command argument type

Bugfixes

  • Broken guild only commands
  • Bot loading in specific architecture

0.9.1 - File & Image send support

09 Oct 18:35
Compare
Choose a tag to compare
Pre-release

There is now support for any bytes.
Pillow JPG and PNG images and files have helper functions. Other formats can be sent by constructing a file object manually.

Example

Pillow image

class Bot(Client):
    
    @command(description="Test method")
    async def test(self):

        img = Image.new("RGB",(500,500),(20,20,20))

       # Method one if you want to specify an image format. The file extension is used as the format.
        return Message(attachments=[
            File.from_image(
                img,
                "image.png"
            )
        ])

      #Method 2 & 3, can only do PNGs.
      return img
      return Message(attachments=[img])

Sending a file

class Bot(Client):
    
    @command(description="Test method")
    async def test(self):

        return Message(attachments=[
            File.from_file(
                 "test/something.txt"
                  #Filename can be specified if wanted
                 filename="somethingelse.txt"
            )
        ])

      # Can also be done like a png
      return Message(attachments=["test/something.txt"])
      
      # but this returns a message. Someone is gonna be baited by this. Probably me :(.
      return "something.txt"
      

0.9.0 - Cogs & channel.edit

04 Oct 18:40
44fb640
Compare
Choose a tag to compare
Pre-release

Implemented cogs and channel.edit

Basic cogs example:

run.py

>>> from pincer import Client
>>>
>>> class BotClient(Client):
...     def __init__(self, *args, **kwargs):
...         self.load_cog("cogs.say")
...         super().__init__(*args, **kwargs)

cogs/say.py

>>> from pincer import command
>>>
>>> class SayCommand:
...     @command()
...     async def say(self, message: str) -> str:
...         return message
>>>
>>> setup = SayCommand

Note on setup method

The setup method may have 1 optional argument which contains the client.
The only restriction on the setup method is that it must be a callable, this means that the following code is also valid:

def setup(client):
    return MyCog(client.bot.name)

Pincer - 0.8.0 Tasks & Object Reorganization

03 Oct 13:19
05e247d
Compare
Choose a tag to compare

Version 0.8.0 release:

Changes

  • Implemented argument choices
  • Bugfix for Optional and descriptions

Tasks

Might be changed in future version

functional way

client = Bot(...)
task = TaskScheduler(client)


@task.loop(minutes=3)
async def my_task(self):
    print(">w<")

my_task.start()
client.run()

OOP way

class Bot(Client):
    ...

    @Client.event
    async def on_ready(self):
        task = TaskScheduler(self)

        @task.loop(seconds=3)
        async def sample():
            print(">w<")

        sample.start()


Bot(...).run()