mirror of
https://github.com/koreanbots/core.git
synced 2025-12-16 14:30:22 +00:00
23 lines
571 B
TypeScript
23 lines
571 B
TypeScript
import fetch from 'node-fetch'
|
|
import jwt from 'jsonwebtoken'
|
|
import fs from 'fs'
|
|
import knsexy from 'knex'
|
|
|
|
export const knex = knsexy({
|
|
client: 'mysql',
|
|
connection: {
|
|
host: process.env.MYSQL_HOST || 'localhost',
|
|
user: process.env.MYSQL_USER || 'root',
|
|
password: process.env.MYSQL_PASSWORD,
|
|
database: process.env.MYSQL_DATABASE || 'discordbots',
|
|
},
|
|
})
|
|
|
|
export async function getBot(id: string) {}
|
|
|
|
export async function getUser(id: string) {
|
|
const res = await knex('users')
|
|
.select(['id', 'avatar', 'tag', 'username', 'perm', 'github'])
|
|
.where({ id })
|
|
}
|