fix(commands/administration): Using the prisma type for prisma call
- changed the User / Guild into UserPrisma / GuildPrisma
This commit is contained in:
parent
8d2268cee0
commit
0db6014b72
1 changed files with 12 additions and 11 deletions
|
|
@ -14,7 +14,7 @@ import {
|
|||
CategoryChannel,
|
||||
} from 'discord.js';
|
||||
import emoji from '../../../assets/emoji.json' assert { type: 'json' };
|
||||
import { Guild, User } from '@prisma/client';
|
||||
import { Guild as GuildPrisma, User as UserPrisma } from '@prisma/client';
|
||||
import { log } from '@lib/log';
|
||||
import { isOwner } from '@lib/perm.js';
|
||||
|
||||
|
|
@ -55,7 +55,7 @@ export default {
|
|||
return;
|
||||
}
|
||||
|
||||
let guildData: Guild | null;
|
||||
let guildData: GuildPrisma | null;
|
||||
try {
|
||||
guildData = await prisma.guild.findUnique({
|
||||
where: {
|
||||
|
|
@ -80,7 +80,7 @@ export default {
|
|||
return;
|
||||
}
|
||||
|
||||
let userData: User | null;
|
||||
let userData: UserPrisma | null;
|
||||
try {
|
||||
userData = await prisma.user.findUnique({
|
||||
where: {
|
||||
|
|
@ -120,7 +120,8 @@ export default {
|
|||
.setColor(guildData.color)
|
||||
.setFooter({
|
||||
text: guildData.footer,
|
||||
}).setDescription(`
|
||||
})
|
||||
.setDescription(`
|
||||
${guildData.logBot ? `${emoji.config.enable} Bot ${channelMention(guildData.logBot)}` : `${emoji.config.disable} Bot`}
|
||||
${guildData.logChannels ? `${emoji.config.enable} Channels ${channelMention(guildData.logChannels)}` : `${emoji.config.disable} Channels`}
|
||||
${guildData.logMember ? `${emoji.config.enable} Member ${channelMention(guildData.logMember)}` : `${emoji.config.disable} Member`}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue