AttachmentMenuBot class final
Represents a bot, which can be added to attachment or side menu
Constructors
- AttachmentMenuBot({required int botUserId, required bool supportsSelfChat, required bool supportsUserChats, required bool supportsBotChats, required bool supportsGroupChats, required bool supportsChannelChats, required bool supportsSettings, required bool requestWriteAccess, required bool isAdded, required bool showInAttachmentMenu, required bool showInSideMenu, required bool showDisclaimerInSideMenu, required String name, AttachmentMenuBotColor? nameColor, File? defaultIcon, File? iosStaticIcon, File? iosAnimatedIcon, File? iosSideMenuIcon, File? androidIcon, File? androidSideMenuIcon, File? macosIcon, File? macosSideMenuIcon, AttachmentMenuBotColor? iconColor, File? webAppPlaceholder, dynamic extra, int? clientId})
-
Represents a bot, which can be added to attachment or side menu
const
-
AttachmentMenuBot.fromJson(Map<
String, dynamic> json) -
Parses a AttachmentMenuBot from TDLib JSON.
factory
Properties
- androidIcon → File?
-
Icon for the bot in TGS format for the official Android app; may be null
final
- androidSideMenuIcon → File?
-
Icon for the bot in SVG format for the official Android app side menu; may be null
final
- botUserId → int
-
User identifier of the bot
final
- clientId → int?
-
Identifier of the TDLib client that sent this object.
final
- defaultIcon → File?
-
Default icon for the bot in SVG format; may be null
final
- extra → dynamic
-
"@extra" of the request this object answers.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- iconColor → AttachmentMenuBotColor?
-
Color to highlight selected icon of the bot if appropriate; may be null
final
- iosAnimatedIcon → File?
-
Icon for the bot in TGS format for the official iOS app; may be null
final
- iosSideMenuIcon → File?
-
Icon for the bot in PNG format for the official iOS app side menu; may be null
final
- iosStaticIcon → File?
-
Icon for the bot in SVG format for the official iOS app; may be null
final
- isAdded → bool
-
True, if the bot was explicitly added by the user. If the bot isn't added, then on the first bot launch toggleBotIsAddedToAttachmentMenu must be called and the bot must be added or removed
final
- macosIcon → File?
-
Icon for the bot in TGS format for the official native macOS app; may be null
final
- macosSideMenuIcon → File?
-
Icon for the bot in PNG format for the official macOS app side menu; may be null
final
- name → String
-
Name for the bot in attachment menu
final
- nameColor → AttachmentMenuBotColor?
-
Color to highlight selected name of the bot if appropriate; may be null
final
- requestWriteAccess → bool
-
True, if the user must be asked for the permission to send messages to the bot
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showDisclaimerInSideMenu → bool
-
True, if a disclaimer, why the bot is shown in the side menu, is needed
final
- showInAttachmentMenu → bool
-
True, if the bot must be shown in the attachment menu
final
- showInSideMenu → bool
-
True, if the bot must be shown in the side menu
final
- supportsBotChats → bool
-
True, if the bot supports opening from attachment menu in private chats with other bots
final
- supportsChannelChats → bool
-
True, if the bot supports opening from attachment menu in channel chats
final
- supportsGroupChats → bool
-
True, if the bot supports opening from attachment menu in basic group and supergroup chats
final
- supportsSelfChat → bool
-
True, if the bot supports opening from attachment menu in the chat with the bot
final
- supportsSettings → bool
-
True, if the bot supports "settings_button_pressed" event
final
- supportsUserChats → bool
-
True, if the bot supports opening from attachment menu in private chats with ordinary users
final
- webAppPlaceholder → File?
-
Default placeholder for opened Web Apps in SVG format; may be null
final
Methods
-
copyWith(
{int? botUserId, bool? supportsSelfChat, bool? supportsUserChats, bool? supportsBotChats, bool? supportsGroupChats, bool? supportsChannelChats, bool? supportsSettings, bool? requestWriteAccess, bool? isAdded, bool? showInAttachmentMenu, bool? showInSideMenu, bool? showDisclaimerInSideMenu, String? name, AttachmentMenuBotColor? nameColor()?, File? defaultIcon()?, File? iosStaticIcon()?, File? iosAnimatedIcon()?, File? iosSideMenuIcon()?, File? androidIcon()?, File? androidSideMenuIcon()?, File? macosIcon()?, File? macosSideMenuIcon()?, AttachmentMenuBotColor? iconColor()?, File? webAppPlaceholder()?, dynamic extra, int? clientId}) → AttachmentMenuBot -
Returns a copy with the given fields replaced. For a nullable
field pass a function, e.g.
field: () => nullto clear it. -
getConstructor(
) → String -
TDLib type name, e.g.
updateNewMessage.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Converts this object to TDLib JSON.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- CONSTRUCTOR → const String
- TDLib type name.