GramIO API Reference / @gramio/contexts/dist / ChatInviteControlMixin
Class: ChatInviteControlMixin<Bot>
Defined in: contexts/index.d.ts:5116
This object represents a mixin that works with all *ChatInviteLink methods
Extends
Context<Bot>.TargetMixin
Extended by
BoostAddedContextChatBackgroundSetContextChatJoinRequestContextChecklistTasksAddedContextChecklistTasksDoneContextDeleteChatPhotoContextDirectMessagePriceChangedContextForumTopicClosedContextForumTopicCreatedContextForumTopicEditedContextForumTopicReopenedContextGeneralForumTopicHiddenContextGeneralForumTopicUnhiddenContextGiveawayCompletedContextGiveawayCreatedContextGiveawayWinnersContextGroupChatCreatedContextLeftChatMemberContextLocationContextMessageContextMigrateFromChatIdContextMigrateToChatIdContextNewChatMembersContextNewChatPhotoContextNewChatTitleContextPinnedMessageContextProximityAlertTriggeredContextVideoChatEndedContextVideoChatParticipantsInvitedContextVideoChatScheduledContextVideoChatStartedContext
Type Parameters
| Type Parameter |
|---|
Bot extends BotLike |
Constructors
Constructor
new ChatInviteControlMixin<
Bot>():ChatInviteControlMixin<Bot>
Returns
ChatInviteControlMixin<Bot>
Inherited from
Properties
| Property | Modifier | Type | Inherited from | Defined in |
|---|---|---|---|---|
bot | public | Bot | Context.bot | contexts/index.d.ts:4726 |
payload | public | Record<string, any> | TargetMixin.payload | contexts/index.d.ts:4740 |
update? | public | TelegramUpdate | Context.update | contexts/index.d.ts:4728 |
updateId? | public | number | Context.updateId | contexts/index.d.ts:4727 |
updateType | protected | UpdateName | Context.updateType | contexts/index.d.ts:4729 |
Accessors
[toStringTag]
Get Signature
get [toStringTag]():
string
Defined in: contexts/index.d.ts:4732
Returns
string
Inherited from
businessConnectionId
Get Signature
get businessConnectionId():
string
Defined in: contexts/index.d.ts:4765
Unique identifier of the business connection from which the message was received. If non-empty, the message belongs to a chat of the corresponding business account that is independent from any potential bot chat which might share the same identifier.
Returns
string
Inherited from
TargetMixin.businessConnectionId
chat
Get Signature
get chat():
Chat
Defined in: contexts/index.d.ts:4759
Conversation the message belongs to
Returns
Inherited from
chatId
Get Signature
get chatId():
number
Defined in: contexts/index.d.ts:4763
Chat ID
Returns
number
Inherited from
chatType
Get Signature
get chatType():
TelegramChatType
Defined in: contexts/index.d.ts:4767
Chat type
Returns
Inherited from
from
Get Signature
get from():
User
Defined in: contexts/index.d.ts:4744
Sender, empty for messages sent to channels
Returns
Inherited from
senderBoostCount
Get Signature
get senderBoostCount():
number
Defined in: contexts/index.d.ts:4757
Optional. If the sender of the message boosted the chat, the number of boosts added by the user
Returns
number
Inherited from
senderChat
Get Signature
get senderChat():
Chat
Defined in: contexts/index.d.ts:4753
Sender of the message, sent on behalf of a chat. The channel itself for channel messages. The supergroup itself for messages from anonymous group administrators. The linked channel for messages automatically forwarded to the discussion group
Returns
Inherited from
senderId
Get Signature
get senderId():
number
Defined in: contexts/index.d.ts:4761
Sender's ID
Returns
number
Inherited from
Methods
createInviteLink()
createInviteLink(
params?):Promise<TelegramChatInviteLink>
Defined in: contexts/index.d.ts:5120
Creates an additional invite link
Parameters
| Parameter | Type |
|---|---|
params? | Optional<CreateChatInviteLinkParams, "chat_id"> |
Returns
Promise<TelegramChatInviteLink>
editInviteLink()
editInviteLink(
link,params?):Promise<TelegramChatInviteLink>
Defined in: contexts/index.d.ts:5122
Edits non-primary invite link created by the bot
Parameters
| Parameter | Type |
|---|---|
link | string |
params? | Optional<EditChatInviteLinkParams, "chat_id" | "invite_link"> |
Returns
Promise<TelegramChatInviteLink>
exportInviteLink()
exportInviteLink(
params?):Promise<string>
Defined in: contexts/index.d.ts:5118
Generates new primary invite link
Parameters
| Parameter | Type |
|---|---|
params? | Optional<ExportChatInviteLinkParams, "chat_id"> |
Returns
Promise<string>
hasFrom()
hasFrom(): this is Require<ChatInviteControlMixin<Bot>, "from" | "senderId">
Defined in: contexts/index.d.ts:4742
Checks if the instance has from and senderId properties
Returns
this is Require<ChatInviteControlMixin<Bot>, "from" | "senderId">
Inherited from
hasSenderChat()
hasSenderChat():
this is Require<ChatInviteControlMixin<Bot>, "senderChat">
Defined in: contexts/index.d.ts:4746
Checks if the instance has senderChat property
Returns
this is Require<ChatInviteControlMixin<Bot>, "senderChat">
Inherited from
is()
is<
T>(rawTypes):this is InstanceType<ContextsMapping<Bot>[T]> & Bot["__Derives"]["global"] & Bot["__Derives"][T] & (Bot["__Derives"] extends {} ? Bot["__Derives"]["global"] & Bot["__Derives"][T] : {})
Defined in: contexts/index.d.ts:4735
Type Parameters
| Type Parameter |
|---|
T extends UpdateName |
Parameters
| Parameter | Type |
|---|---|
rawTypes | MaybeArray<SoftString<T>> |
Returns
this is InstanceType<ContextsMapping<Bot>[T]> & Bot["__Derives"]["global"] & Bot["__Derives"][T] & (Bot["__Derives"] extends {} ? Bot["__Derives"]["global"] & Bot["__Derives"][T] : {})
Inherited from
isChannel()
isChannel():
this is RequireValue<ChatInviteControlMixin<Bot>, "chatType", Channel>
Defined in: contexts/index.d.ts:4775
Is this chat a channel?
Returns
this is RequireValue<ChatInviteControlMixin<Bot>, "chatType", Channel>
Inherited from
isGroup()
isGroup():
this is RequireValue<ChatInviteControlMixin<Bot>, "chatType", Group>
Defined in: contexts/index.d.ts:4771
Is this chat a group?
Returns
this is RequireValue<ChatInviteControlMixin<Bot>, "chatType", Group>
Inherited from
isPM()
isPM():
this is RequireValue<ChatInviteControlMixin<Bot>, "chatType", Private>
Defined in: contexts/index.d.ts:4769
Is this chat a private one?
Returns
this is RequireValue<ChatInviteControlMixin<Bot>, "chatType", Private>
Inherited from
isSupergroup()
isSupergroup():
this is RequireValue<ChatInviteControlMixin<Bot>, "chatType", Supergroup>
Defined in: contexts/index.d.ts:4773
Is this chat a supergroup?
Returns
this is RequireValue<ChatInviteControlMixin<Bot>, "chatType", Supergroup>
Inherited from
revokeInviteLink()
revokeInviteLink(
link,params?):Promise<TelegramChatInviteLink>
Defined in: contexts/index.d.ts:5124
Revokes an invite link generated by a bot
Parameters
| Parameter | Type |
|---|---|
link | string |
params? | Optional<RevokeChatInviteLinkParams, "chat_id" | "invite_link"> |
Returns
Promise<TelegramChatInviteLink>