-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Context updates with Bot API 7.10
- Loading branch information
Showing
18 changed files
with
192 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,6 @@ class Birthdate { | |
'day': day, | ||
'month': month, | ||
'year': year, | ||
}; | ||
}..removeWhere(_nullFilter); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
part of 'models.dart'; | ||
|
||
/// Represents a paid media purchase made by a user. | ||
class PaidMediaPurchased implements WithUser { | ||
/// The user who purchased the media. | ||
@override | ||
final User from; | ||
|
||
/// A bot-specified payload related to the paid media. | ||
final String paidMediaPayload; | ||
|
||
/// Creates a [PaidMediaPurchased] object. | ||
const PaidMediaPurchased({ | ||
required this.from, | ||
required this.paidMediaPayload, | ||
}); | ||
|
||
/// Creates a [PaidMediaPurchased] object from a JSON map. | ||
/// | ||
/// The JSON map should contain `from` and `paid_media_payload` fields. | ||
factory PaidMediaPurchased.fromJson(Map<String, dynamic> json) { | ||
return PaidMediaPurchased( | ||
from: User.fromJson(json['from']), | ||
paidMediaPayload: json['paid_media_payload'], | ||
); | ||
} | ||
|
||
/// Converts this object to a JSON map. | ||
/// | ||
/// Returns a map with `from` and `paid_media_payload` fields. | ||
Map<String, dynamic> toJson() { | ||
return { | ||
'from': from.toJson(), | ||
'paid_media_payload': paidMediaPayload, | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.