AttachmentMenuBot class
Represents a bot that can be added to the attachment or side menu
- Inheritance
- Available extensions
- Annotations
-
- @immutable
Constructors
- AttachmentMenuBot({required int botUserId, required bool supportsSelfChat, required bool supportsUserChats, required bool supportsBotChats, required bool supportsGroupChats, required bool supportsChannelChats, 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})
-
const
Properties
- androidIcon → File?
-
androidIcon Icon for the bot in TGS format for the official Android app;
may be null
final
- androidSideMenuIcon → File?
-
androidSideMenuIcon Icon for the bot in SVG format for the official
Android app side menu; may be null
final
- botUserId → int
-
botUserId User identifier of the bot
final
- defaultIcon → File?
-
defaultIcon Default icon for the bot in SVG format; may be null
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- iconColor → AttachmentMenuBotColor?
-
iconColor Color to highlight the selected icon of the bot if
appropriate; may be null
final
- iosAnimatedIcon → File?
-
iosAnimatedIcon Icon for the bot in TGS format for the official iOS app;
may be null
final
- iosSideMenuIcon → File?
-
iosSideMenuIcon Icon for the bot in PNG format for the official iOS app
side menu; may be null
final
- iosStaticIcon → File?
-
iosStaticIcon Icon for the bot in SVG format for the official iOS app;
may be null
final
- isAdded → bool
-
isAdded 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?
-
macosIcon Icon for the bot in TGS format for the official native macOS
app; may be null
final
- macosSideMenuIcon → File?
-
macosSideMenuIcon Icon for the bot in PNG format for the official macOS
app side menu; may be null
final
- name → String
-
name Name for the bot in the attachment menu
final
- nameColor → AttachmentMenuBotColor?
-
nameColor Color to highlight the selected name of the bot if
appropriate; may be null
final
- requestWriteAccess → bool
-
requestWriteAccess 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
-
showDisclaimerInSideMenu True, if a disclaimer explaining why the bot is
shown in the side menu is needed
final
- showInAttachmentMenu → bool
-
showInAttachmentMenu True, if the bot must be shown in the attachment
menu
final
- showInSideMenu → bool
-
showInSideMenu True, if the bot must be shown in the side menu
final
- supportsBotChats → bool
-
supportsBotChats True, if the bot supports opening from the attachment
menu in private chats with other bots
final
- supportsChannelChats → bool
-
supportsChannelChats True, if the bot supports opening from the
attachment menu in channel chats
final
- supportsGroupChats → bool
-
supportsGroupChats True, if the bot supports opening from the attachment
menu in basic group and supergroup chats
final
- supportsSelfChat → bool
-
supportsSelfChat True, if the bot supports opening from the attachment
menu in the chat with the bot
final
- supportsUserChats → bool
-
supportsUserChats True, if the bot supports opening from the attachment
menu in private chats with ordinary users
final
- webAppPlaceholder → File?
-
webAppPlaceholder 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? 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}) → AttachmentMenuBot -
Available on AttachmentMenuBot, provided by the AttachmentMenuBotExtensions extension
-
getConstructor(
) → String -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
fromJson(
Map< String, dynamic> ? json) → AttachmentMenuBot?
Constants
- constructor → const String