add several feedback replies for plugin

This commit is contained in:
InsanusMokrassar 2022-01-05 01:05:02 +06:00
parent 852262853e
commit 0e097fc9ba

View File

@ -162,7 +162,10 @@ class CaptchaBotPlugin : Plugin {
} }
sendMessage(it.chat, "Settings updated").also { sent -> sendMessage(it.chat, "Settings updated").also { sent ->
delay(5000L) delay(5000L)
deleteMessage(sent)
if (settings.autoRemoveCommands) {
deleteMessage(sent)
}
} }
} }
} }
@ -205,6 +208,8 @@ class CaptchaBotPlugin : Plugin {
settings.copy(enabled = false) settings.copy(enabled = false)
) )
reply(message, "Captcha has been disabled")
if (settings.autoRemoveCommands) { if (settings.autoRemoveCommands) {
deleteMessage(message) deleteMessage(message)
} }
@ -220,6 +225,8 @@ class CaptchaBotPlugin : Plugin {
settings.copy(enabled = true) settings.copy(enabled = true)
) )
reply(message, "Captcha has been enabled")
if (settings.autoRemoveCommands) { if (settings.autoRemoveCommands) {
deleteMessage(message) deleteMessage(message)
} }
@ -235,6 +242,8 @@ class CaptchaBotPlugin : Plugin {
settings.copy(autoRemoveEvents = true) settings.copy(autoRemoveEvents = true)
) )
reply(message, "Ok, user joined service messages will be deleted")
if (settings.autoRemoveCommands) { if (settings.autoRemoveCommands) {
deleteMessage(message) deleteMessage(message)
} }
@ -250,6 +259,8 @@ class CaptchaBotPlugin : Plugin {
settings.copy(autoRemoveEvents = false) settings.copy(autoRemoveEvents = false)
) )
reply(message, "Ok, user joined service messages will not be deleted")
if (settings.autoRemoveCommands) { if (settings.autoRemoveCommands) {
deleteMessage(message) deleteMessage(message)
} }