feat: log
This commit is contained in:
@@ -24,7 +24,7 @@ class GroupAdminOnly
|
||||
$type = $bot->chat()?->type;
|
||||
$typeValue = $type instanceof ChatType ? $type->value : (string) $type;
|
||||
if (! in_array($typeValue, [ChatType::GROUP->value, ChatType::SUPERGROUP->value, 'group', 'supergroup'], true)) {
|
||||
Log::info('telegram GroupAdminOnly: rejected non-group chat', [
|
||||
Log::channel('telegram')->info('telegram GroupAdminOnly: rejected non-group chat', [
|
||||
'chat_id' => $chatId,
|
||||
'type' => $typeValue,
|
||||
]);
|
||||
@@ -35,7 +35,7 @@ class GroupAdminOnly
|
||||
try {
|
||||
$member = $bot->getChatMember($chatId, $userId);
|
||||
} catch (\Throwable $e) {
|
||||
Log::warning('telegram GroupAdminOnly: getChatMember failed', [
|
||||
Log::channel('telegram')->warning('telegram GroupAdminOnly: getChatMember failed', [
|
||||
'chat_id' => $chatId,
|
||||
'user_id' => $userId,
|
||||
'error' => $e->getMessage(),
|
||||
|
||||
Reference in New Issue
Block a user