Revolt-Bot/src/utils/checkAutoProxy.ts

17 lines
344 B
TypeScript
Raw Normal View History

import UserRepo from "repositories/UserRepo";
import { Database } from "bun:sqlite";
2024-03-15 18:41:08 +01:00
function checkAutoProxy
2024-03-15 18:41:08 +01:00
(
userId: string,
2024-03-15 18:41:08 +01:00
database: Database
)
2024-03-15 18:41:08 +01:00
{
const repo = new UserRepo(database)
const user_id = repo.getIdByRevoltId(userId)
const is_enabled = repo.isProxyEnabled(user_id)
return is_enabled
2024-03-15 18:41:08 +01:00
}
export default checkAutoProxy;