<?php
require_once '../bot.php';

$query = $db->query("SELECT * FROM `dFile`");
while($row = $query->fetch_assoc()){
    if($row['delay'] < time()){
        $bot->deleteMessage(['chat_id'=> $row['userID'], 'message_id'=> $row['msgID']]);
        $db->query("DELETE FROM `dFile` WHERE `rowID`= '{$row['rowID']}';");
    }
}