refactor(event/client): adding type to the ready event
This commit is contained in:
parent
c32436202f
commit
4d32bca3f7
1 changed files with 3 additions and 1 deletions
|
|
@ -3,15 +3,17 @@ import {
|
||||||
EmbedBuilder,
|
EmbedBuilder,
|
||||||
PresenceUpdateStatus,
|
PresenceUpdateStatus,
|
||||||
Events,
|
Events,
|
||||||
|
User,
|
||||||
} from 'discord.js';
|
} from 'discord.js';
|
||||||
import { prisma } from '../../lib/prisma.ts';
|
import { prisma } from '../../lib/prisma.ts';
|
||||||
|
import { Bot as BotPrisma } from '@prisma/client';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: Events.ClientReady,
|
name: Events.ClientReady,
|
||||||
once: true,
|
once: true,
|
||||||
async execute(client: User) {
|
async execute(client: User) {
|
||||||
try {
|
try {
|
||||||
const botData: Bot = await prisma.bot.findUnique({
|
const botData: BotPrisma = await prisma.bot.findUnique({
|
||||||
where: {
|
where: {
|
||||||
id: 1,
|
id: 1,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue