Skip to content
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

Updated documentation for chat-members plugin, adding new sections about filters #1181

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

rayz1065
Copy link
Member

This pull request adds documentation for chat member filters in the chat-members plugin section.

grammyjs/chat-members#10

Let me know if the paragraph structure or anything else could be improved.

Copy link

github-actions bot commented Jan 23, 2025

@github-actions github-actions bot temporarily deployed to pull request January 23, 2025 14:18 Inactive
Copy link
Member

@KnorpelSenf KnorpelSenf left a comment

Choose a reason for hiding this comment

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

Got a few things here and there, mostly nitpicks. Thanks for the extensive docs, though, we need more people like you who do this!

site/docs/plugins/chat-members.md Show resolved Hide resolved
site/docs/plugins/chat-members.md Outdated Show resolved Hide resolved
site/docs/plugins/chat-members.md Outdated Show resolved Hide resolved
site/docs/plugins/chat-members.md Outdated Show resolved Hide resolved
site/docs/plugins/chat-members.md Outdated Show resolved Hide resolved
site/docs/plugins/chat-members.md Outdated Show resolved Hide resolved
site/docs/plugins/chat-members.md Outdated Show resolved Hide resolved
site/docs/plugins/chat-members.md Outdated Show resolved Hide resolved
site/docs/plugins/chat-members.md Outdated Show resolved Hide resolved
site/docs/plugins/chat-members.md Show resolved Hide resolved
@github-actions github-actions bot temporarily deployed to pull request January 24, 2025 11:37 Inactive
@github-actions github-actions bot temporarily deployed to pull request January 24, 2025 12:04 Inactive
@github-actions github-actions bot temporarily deployed to pull request January 27, 2025 22:51 Inactive
@rayz1065 rayz1065 requested a review from KnorpelSenf January 28, 2025 09:23
bot.callbackQuery("foo", async (ctx) => {
const chatMember = await ctx.getChatMember(ctx.from.id);

if (!chatMemberIs(chatMember, "free")) {
Copy link
Member

Choose a reason for hiding this comment

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

Unrelated to the docs but the plugin could use a hydration feature that permits

Suggested change
if (!chatMemberIs(chatMember, "free")) {
if (!chatMember.is("free")) {

Copy link
Member Author

Choose a reason for hiding this comment

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

That's a very nice idea! They could be added for getChatMember and getChatAdministrators.
I already have a draft of the types (kinda messy right now but I'll work on them) and they seem to work.

Copy link
Member

@KnorpelSenf KnorpelSenf left a comment

Choose a reason for hiding this comment

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

LGTM

@KnorpelSenf
Copy link
Member

@roziscoding anything else?

@roziscoding
Copy link
Contributor

@roziscoding anything else?

not at all, this looks great!
thanks @rayz1065!

@KnorpelSenf KnorpelSenf requested a review from rojvv January 30, 2025 14:02
@github-actions github-actions bot temporarily deployed to pull request February 6, 2025 15:21 Inactive
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.

4 participants