mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Expand moderating mode
Add additional moderating options.
This commit is contained in:
parent
54685155b0
commit
3e379f3171
1 changed files with 5 additions and 1 deletions
|
@ -153,7 +153,7 @@ void BotKeyboard::leaveEventHook(QEvent *e) {
|
||||||
bool BotKeyboard::moderateKeyActivate(int key) {
|
bool BotKeyboard::moderateKeyActivate(int key) {
|
||||||
if (const auto item = _session->data().message(_wasForMsgId)) {
|
if (const auto item = _session->data().message(_wasForMsgId)) {
|
||||||
if (const auto markup = item->Get<HistoryMessageReplyMarkup>()) {
|
if (const auto markup = item->Get<HistoryMessageReplyMarkup>()) {
|
||||||
if (key >= Qt::Key_1 && key <= Qt::Key_9) {
|
if (key >= Qt::Key_1 && key <= Qt::Key_2) {
|
||||||
const auto index = int(key - Qt::Key_1);
|
const auto index = int(key - Qt::Key_1);
|
||||||
if (!markup->rows.empty()
|
if (!markup->rows.empty()
|
||||||
&& index >= 0
|
&& index >= 0
|
||||||
|
@ -167,6 +167,10 @@ bool BotKeyboard::moderateKeyActivate(int key) {
|
||||||
App::sendBotCommand(user, user, qsl("/translate"));
|
App::sendBotCommand(user, user, qsl("/translate"));
|
||||||
} else if (key == Qt::Key_W) {
|
} else if (key == Qt::Key_W) {
|
||||||
App::sendBotCommand(user, user, qsl("/eng"));
|
App::sendBotCommand(user, user, qsl("/eng"));
|
||||||
|
} else if (key == Qt::Key_3) {
|
||||||
|
App::sendBotCommand(user, user, qsl("/pattern"));
|
||||||
|
} else if (key == Qt::Key_4) {
|
||||||
|
App::sendBotCommand(user, user, qsl("/abuse"));
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue