pinMessage method
Pins the current message in the chat.
Example:
await ctx.pinMessage();
await ctx.pinMessage(disableNotification: true);
Implementation
Future<bool> pinMessage({
bool? disableNotification,
}) async {
final chatId = _getChatId();
final msgId = messageId;
_verifyInfo(
[chatId, msgId],
APIMethod.pinChatMessage,
description:
"No message or chat information found in the current update.",
);
return api.pinChatMessage(
chatId!,
msgId!,
disableNotification: disableNotification,
);
}