Skip to content

fix: update last page button emoji #1772

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 5, 2025

Conversation

mifuyutsuki
Copy link
Contributor

Pull Request Type

  • Feature addition
  • Bugfix
  • Documentation update
  • Code refactor
  • Tests improvement
  • CI/CD pipeline enhancement
  • Other: [Replace with a description]

Description

For some odd reason and for a while, the Paginator default page navigation buttons are ⏮️⬅️➡️⏩ (skip first - left - right - fast forward(?)) - note the first page and last page buttons not being complements of each other. This PR finally changes these to ⏮️⬅️➡️⏭️ (skip first - left - right - skip last). (Unless someone else has other preferences...)

Changes

  • Changed Paginator attribute last_button_emoji default from ⏩ to ⏭️

Related Issues

Test Scenarios

This snippet creates a paginator of 10 embeds.

from interactions import (
  Client,
  Intents,
  slash_command,
  SlashContext,
  Embed,
)
from interactions.ext.paginators import Paginator
bot = Client(intents=Intents.DEFAULT)

@slash_command(name="test", description="Test command")
async def test_cmd(ctx: SlashContext):
  p = Paginator.create_from_embeds(bot, *[Embed(title=f"Page {i}") for i in range(10)])
  return await p.send(ctx)

bot.start("token")

Python Compatibility

  • I've ensured my code works on Python 3.10.x
  • I've ensured my code works on Python 3.11.x

Checklist

  • I've run the pre-commit code linter over all edited files
  • I've tested my changes on supported Python versions
  • I've added tests for my code, if applicable
  • I've updated / added documentation, where applicable

Copy link
Member

@silasary silasary left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable to me

@silasary silasary merged commit 4dc1764 into interactions-py:unstable May 5, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants