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,
|
CategoryChannel,
|
||||||
} from 'discord.js';
|
} from 'discord.js';
|
||||||
import emoji from '../../../assets/emoji.json' assert { type: 'json' };
|
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 { log } from '@lib/log';
|
||||||
import { isOwner } from '@lib/perm.js';
|
import { isOwner } from '@lib/perm.js';
|
||||||
|
|
||||||
|
|
@ -55,7 +55,7 @@ export default {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let guildData: Guild | null;
|
let guildData: GuildPrisma | null;
|
||||||
try {
|
try {
|
||||||
guildData = await prisma.guild.findUnique({
|
guildData = await prisma.guild.findUnique({
|
||||||
where: {
|
where: {
|
||||||
|
|
@ -80,7 +80,7 @@ export default {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let userData: User | null;
|
let userData: UserPrisma | null;
|
||||||
try {
|
try {
|
||||||
userData = await prisma.user.findUnique({
|
userData = await prisma.user.findUnique({
|
||||||
where: {
|
where: {
|
||||||
|
|
@ -120,14 +120,15 @@ export default {
|
||||||
.setColor(guildData.color)
|
.setColor(guildData.color)
|
||||||
.setFooter({
|
.setFooter({
|
||||||
text: guildData.footer,
|
text: guildData.footer,
|
||||||
}).setDescription(`
|
})
|
||||||
${guildData.logBot ? `${emoji.config.enable} Bot ${channelMention(guildData.logBot)}` : `${emoji.config.disable} Bot`}
|
.setDescription(`
|
||||||
${guildData.logChannels ? `${emoji.config.enable} Channels ${channelMention(guildData.logChannels)}` : `${emoji.config.disable} Channels`}
|
${guildData.logBot ? `${emoji.config.enable} Bot ${channelMention(guildData.logBot)}` : `${emoji.config.disable} Bot`}
|
||||||
${guildData.logMember ? `${emoji.config.enable} Member ${channelMention(guildData.logMember)}` : `${emoji.config.disable} Member`}
|
${guildData.logChannels ? `${emoji.config.enable} Channels ${channelMention(guildData.logChannels)}` : `${emoji.config.disable} Channels`}
|
||||||
${guildData.logMod ? `${emoji.config.enable} Moderation ${channelMention(guildData.logMod)}` : `${emoji.config.disable} Moderation`}
|
${guildData.logMember ? `${emoji.config.enable} Member ${channelMention(guildData.logMember)}` : `${emoji.config.disable} Member`}
|
||||||
${guildData.logMsg ? `${emoji.config.enable} Message ${channelMention(guildData.logMsg)}` : `${emoji.config.disable} Message`}
|
${guildData.logMod ? `${emoji.config.enable} Moderation ${channelMention(guildData.logMod)}` : `${emoji.config.disable} Moderation`}
|
||||||
${guildData.logServer ? `${emoji.config.enable} Server ${channelMention(guildData.logServer)}` : `${emoji.config.disable} Server`}
|
${guildData.logMsg ? `${emoji.config.enable} Message ${channelMention(guildData.logMsg)}` : `${emoji.config.disable} Message`}
|
||||||
`);
|
${guildData.logServer ? `${emoji.config.enable} Server ${channelMention(guildData.logServer)}` : `${emoji.config.disable} Server`}
|
||||||
|
`);
|
||||||
|
|
||||||
await interaction.reply({
|
await interaction.reply({
|
||||||
embeds: [logsData],
|
embeds: [logsData],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue