Skip to content

Message: Add pin() and unpin() methods #67

Description

@PenguinBoi12

Matrix supports m.room.pinned_events state events. Pinning is a good tool that fits well in message.

Proposed API

async def pin(self) -> None: ...
async def unpin(self) -> None: ...

Example

@bot.command()
async def pin(ctx: Context) -> None:
    await ctx.message.pin()

@bot.command()
async def unpin(ctx: Context) -> None:
    await ctx.message.unpin()

Before opening a PR

  • Write unit tests
  • Run mypy matrix/
  • Run pytest tests/
  • Run black .

Metadata

Metadata

Assignees

Labels

Fields

No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions