Class TelegramBotConfigurationProperties
java.lang.Object
io.micronaut.chatbots.telegram.core.TelegramBotConfigurationProperties
- All Implemented Interfaces:
BotConfiguration
,TelegramBotConfiguration
,io.micronaut.core.naming.Named
,io.micronaut.core.util.Toggleable
@EachProperty("micronaut.chatbots.telegram.bots")
public class TelegramBotConfigurationProperties
extends Object
implements TelegramBotConfiguration
EachProperty
implementation of TelegramBotConfiguration
.- Since:
- 1.0.0
- Author:
- Sergio del Amo
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@NonNull String
@NonNull String
getName()
@NonNull String
getToken()
boolean
void
setAtUsername
(@NonNull String atUsername) void
setEnabled
(boolean enabled) Sets whether this configuration is enabled.void
-
Field Details
-
PREFIX
- See Also:
-
-
Constructor Details
-
TelegramBotConfigurationProperties
-
-
Method Details
-
getAtUsername
- Specified by:
getAtUsername
in interfaceTelegramBotConfiguration
- Returns:
- bot username prefixed with @
-
setAtUsername
- Parameters:
atUsername
- bot username prefixed with @
-
getToken
- Specified by:
getToken
in interfaceTelegramBotConfiguration
- Returns:
- Telegram's token
-
setToken
- Parameters:
token
- Telegram's token
-
getName
- Specified by:
getName
in interfaceio.micronaut.core.naming.Named
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabled
in interfaceio.micronaut.core.util.Toggleable
-
setEnabled
public void setEnabled(boolean enabled) Sets whether this configuration is enabled. Default true.- Parameters:
enabled
- The enabled setting
-