-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
238 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* The MIT License | ||
* | ||
* Copyright 2023 Cadiducho. | ||
* Read more in https://github.com/Cadiducho/Telegram-Bot-API/blob/master/LICENSE | ||
*/ | ||
|
||
package com.cadiducho.telegrambotapi; | ||
|
||
import lombok.Getter; | ||
import lombok.Setter; | ||
import lombok.ToString; | ||
|
||
/** | ||
* This object represents the bot's name. | ||
*/ | ||
@ToString | ||
@Getter @Setter | ||
public class BotName { | ||
|
||
/** | ||
* The bot's name | ||
*/ | ||
private String name; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
src/main/java/com/cadiducho/telegrambotapi/SwitchInlineQueryChosenChat.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* The MIT License | ||
* | ||
* Copyright 2023 Cadiducho. | ||
* Read more in https://github.com/Cadiducho/Telegram-Bot-API/blob/master/LICENSE | ||
*/ | ||
|
||
package com.cadiducho.telegrambotapi; | ||
|
||
import com.squareup.moshi.Json; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
import lombok.ToString; | ||
|
||
/** | ||
* This object represents an inline button that switches the current user to inline mode in a chosen chat, with an optional default inline query. | ||
*/ | ||
@ToString | ||
@Getter @Setter | ||
public class SwitchInlineQueryChosenChat { | ||
|
||
/** | ||
* Optional. The default inline query to be inserted in the input field. If left empty, only the bot's username will be inserted | ||
*/ | ||
private String query; | ||
|
||
/** | ||
* Optional. True, if private chats with users can be chosen | ||
*/ | ||
@Json(name = "allow_user_chats") private Boolean allowUserChats; | ||
|
||
/** | ||
* Optional. True, if private chats with bots can be chosen | ||
*/ | ||
@Json(name = "allow_bot_chats") private Boolean allowBotChats; | ||
|
||
/** | ||
* Optional. True, if group and supergroup chats can be chosen | ||
*/ | ||
@Json(name = "allow_group_chats") private Boolean allowGroupChats; | ||
|
||
/** | ||
* Optional. True, if channel chats can be chosen | ||
*/ | ||
@Json(name = "allow_channel_chats") private Boolean allowChannelChats; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
src/main/java/com/cadiducho/telegrambotapi/inline/InlineQueryResultsButton.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
* The MIT License | ||
* | ||
* Copyright 2023 Cadiducho. | ||
* Read more in https://github.com/Cadiducho/Telegram-Bot-API/blob/master/LICENSE | ||
*/ | ||
package com.cadiducho.telegrambotapi.inline; | ||
|
||
import com.cadiducho.telegrambotapi.WebAppInfo; | ||
import com.squareup.moshi.Json; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
import lombok.ToString; | ||
|
||
/** | ||
* This object represents a button to be shown above inline query results. You must use exactly one of the optional fields. | ||
*/ | ||
@ToString | ||
@Getter @Setter | ||
public class InlineQueryResultsButton { | ||
|
||
/** | ||
* Label text on the button | ||
*/ | ||
private String text; | ||
|
||
/** | ||
* Optional. Description of the Web App that will be launched when the user presses the button. | ||
* The Web App will be able to switch back to the inline mode using the method switchInlineQuery inside the Web App. | ||
*/ | ||
@Json(name = "web_app") WebAppInfo webApp; | ||
|
||
/** | ||
* Optional. Deep-linking parameter for the /start message sent to the bot when a user presses the button. 1-64 characters, only A-Z, a-z, 0-9, _ and - are allowed. | ||
* | ||
* Example: An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. | ||
* To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. | ||
* The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an OAuth link. | ||
* Once done, the bot can offer a switch_inline button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities. | ||
*/ | ||
@Json(name = "start_parameter") String startParameter; | ||
} |
Oops, something went wrong.