Binato/server/packets/AddFriend.ts

7 lines
214 B
TypeScript
Raw Normal View History

2023-09-10 12:59:22 +01:00
import User from "../objects/User";
2023-08-20 13:03:01 +01:00
2023-09-10 12:59:22 +01:00
export default function AddFriend(user:User, friendId:number) {
2023-08-20 13:03:01 +01:00
user.shared.database.query("INSERT INTO friends (user, friendsWith) VALUES (?, ?)", [
user.id, friendId
]);
}