Skip to content

Commit

Permalink
add api methods for setUserEmojiStatus
Browse files Browse the repository at this point in the history
  • Loading branch information
InsanusMokrassar committed Dec 8, 2024
1 parent 27241fa commit 696219d
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 5 deletions.
13 changes: 11 additions & 2 deletions tgbotapi.api/api/tgbotapi.api.api
Original file line number Diff line number Diff line change
Expand Up @@ -2151,10 +2151,10 @@ public final class dev/inmo/tgbotapi/extensions/api/send/media/SendVoiceKt {
}

public final class dev/inmo/tgbotapi/extensions/api/send/payments/CreateInvoiceLinkKt {
public static final fun createInvoiceLink (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/Integer;Ljava/util/List;Ljava/lang/String;ZZZZZZZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun createInvoiceLink$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/Integer;Ljava/util/List;Ljava/lang/String;ZZZZZZZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun createInvoiceLink-1vVIECE (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;Lkotlin/time/Duration;Ljava/lang/Integer;Ljava/util/List;Ljava/lang/String;ZZZZZZZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun createInvoiceLink-1vVIECE$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;Lkotlin/time/Duration;Ljava/lang/Integer;Ljava/util/List;Ljava/lang/String;ZZZZZZZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun createInvoiceLink-B82mBWQ (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;Ljava/lang/Integer;Ljava/util/List;Ljava/lang/String;ZZZZZZZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun createInvoiceLink-B82mBWQ$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;Ljava/lang/Integer;Ljava/util/List;Ljava/lang/String;ZZZZZZZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
}

public final class dev/inmo/tgbotapi/extensions/api/send/payments/RefundStarPaymentKt {
Expand Down Expand Up @@ -2203,6 +2203,15 @@ public final class dev/inmo/tgbotapi/extensions/api/send/polls/SendRegularPollKt
public static synthetic fun sendRegularPoll-smr50Sk$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ljava/util/List;Ljava/util/List;Ldev/inmo/tgbotapi/types/polls/ScheduledCloseInfo;ZZZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
}

public final class dev/inmo/tgbotapi/extensions/api/set/SetUserEmojiStatusKt {
public static final fun setUserEmojiStatus-8OHYyMQ (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLjava/lang/String;DLkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static final fun setUserEmojiStatus-OZgzbMQ (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ljava/lang/String;DLkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static final fun setUserEmojiStatus-SrqJ0BM (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ljava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun setUserEmojiStatus-SrqJ0BM$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ljava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static final fun setUserEmojiStatus-bic5Y5o (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLjava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun setUserEmojiStatus-bic5Y5o$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLjava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
}

public final class dev/inmo/tgbotapi/extensions/api/stickers/AddStickerToSetKt {
public static final fun addStickerToSet (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/CommonUser;Ldev/inmo/tgbotapi/types/stickers/StickerSet;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ldev/inmo/tgbotapi/types/StickerFormat;Ljava/util/List;Ldev/inmo/tgbotapi/types/stickers/MaskPosition;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static final fun addStickerToSet (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/CommonUser;Ldev/inmo/tgbotapi/types/stickers/StickerSet;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ldev/inmo/tgbotapi/types/StickerFormat;Ljava/util/List;Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ public suspend fun TelegramBot.createInvoiceLink(
providerToken: String,
currency: Currency,
prices: List<LabeledPrice>,
businessConnectionId: BusinessConnectionId? = null,
maxTipAmount: Int? = null,
suggestedTipAmounts: List<Int>? = null,
providerData: String? = null,
Expand All @@ -33,7 +32,6 @@ public suspend fun TelegramBot.createInvoiceLink(
payload = payload,
providerToken = providerToken,
currency = currency,
businessConnectionId = businessConnectionId,
prices = prices,
subscriptionPeriod = null,
maxTipAmount = maxTipAmount,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
package dev.inmo.tgbotapi.extensions.api.set

import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.set.SetUserEmojiStatus
import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.chat.User
import korlibs.time.DateTime

public suspend fun TelegramBot.setUserEmojiStatus(
userId: UserId,
customEmojiId: CustomEmojiId,
expirationDate: TelegramDate? = null
): Boolean = execute(
SetUserEmojiStatus(
userId = userId,
customEmojiId = customEmojiId,
expirationDate = expirationDate
)
)

public suspend fun TelegramBot.setUserEmojiStatus(
user: User,
customEmojiId: CustomEmojiId,
expirationDate: TelegramDate? = null
): Boolean = setUserEmojiStatus(
user.id,
customEmojiId,
expirationDate
)


public suspend fun TelegramBot.setUserEmojiStatus(
userId: UserId,
customEmojiId: CustomEmojiId,
expirationDate: DateTime
): Boolean = setUserEmojiStatus(
userId,
customEmojiId,
expirationDate.toTelegramDate()
)

public suspend fun TelegramBot.setUserEmojiStatus(
user: User,
customEmojiId: CustomEmojiId,
expirationDate: DateTime
): Boolean = setUserEmojiStatus(
user.id,
customEmojiId,
expirationDate
)
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ data class SendGift internal constructor(
override val text: String,
@SerialName(textParseModeField)
override val parseMode: ParseMode?,
@SerialName(entitiesField)
@SerialName(textEntitiesField)
private val rawEntities: List<RawMessageEntity>? = null,
) : SimpleRequest<Boolean>, TextedOutput {
override val textSources: TextSourcesList? by lazy {
Expand Down

0 comments on commit 696219d

Please sign in to comment.