Skip to content

Commit

Permalink
chore: small improves
Browse files Browse the repository at this point in the history
  • Loading branch information
kravetsone committed Jul 7, 2024
1 parent 27cd931 commit e59f19f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
]
},
"imports": {
"@gramio/types": "jsr:@gramio/types@^7.6.0",
"@gramio/types": "jsr:@gramio/types@^7.7.0",
"inspectable": "npm:inspectable@^3.0.2"
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gramio/contexts",
"version": "0.0.19",
"version": "0.0.20",
"main": "dist/index.js",
"keywords": [
"gramio",
Expand Down
12 changes: 8 additions & 4 deletions src/contexts/refunded-payment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,12 @@ class RefundedPaymentContext<Bot extends BotLike> extends Context<Bot> {
this.payload = options.payload;
}

/** Received payment */
get eventPayment() {
/**
* This object contains basic information about a refunded payment.
*
* [Documentation](https://core.telegram.org/bots/api/#refundedpayment)
*/
get eventRefundedPayment() {
return new RefundedPayment(
this.payload.refunded_payment as TelegramObjects.TelegramRefundedPayment,
);
Expand Down Expand Up @@ -75,7 +79,7 @@ applyMixins(RefundedPaymentContext, [
PinsMixin,
CloneMixin,
]);
memoizeGetters(RefundedPaymentContext, ["eventPayment"]);
memoizeGetters(RefundedPaymentContext, ["eventRefundedPayment"]);

inspectable(RefundedPaymentContext, {
serialize(context) {
Expand All @@ -87,7 +91,7 @@ inspectable(RefundedPaymentContext, {
chat: context.chat,
chatId: context.chatId,
chatType: context.chatType,
eventPayment: context.eventPayment,
eventRefundedPayment: context.eventRefundedPayment,
};
},
});
Expand Down

0 comments on commit e59f19f

Please sign in to comment.