mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-11-17 17:23:08 +02:00
Fix DM
This commit is contained in:
parent
ae72266b82
commit
fcd390bc9d
@ -26,6 +26,7 @@ module.exports = class TicketManager {
|
|||||||
categoryId, interaction, topic, reference,
|
categoryId, interaction, topic, reference,
|
||||||
}) {
|
}) {
|
||||||
const cacheKey = `cache/category+guild+questions:${categoryId}`;
|
const cacheKey = `cache/category+guild+questions:${categoryId}`;
|
||||||
|
/** @type {import('@prisma/client').Category} */
|
||||||
let category = await this.client.keyv.get(cacheKey);
|
let category = await this.client.keyv.get(cacheKey);
|
||||||
if (!category) {
|
if (!category) {
|
||||||
category = await this.client.prisma.category.findUnique({
|
category = await this.client.prisma.category.findUnique({
|
||||||
@ -66,7 +67,7 @@ module.exports = class TicketManager {
|
|||||||
|
|
||||||
const getMessage = this.client.i18n.getLocale(category.guild.locale);
|
const getMessage = this.client.i18n.getLocale(category.guild.locale);
|
||||||
|
|
||||||
const rlKey = `ratelimits/guild-user:${interaction.guild.id}-${interaction.user.id}`;
|
const rlKey = `ratelimits/guild-user:${category.guildId}-${interaction.user.id}`;
|
||||||
const rl = await this.client.keyv.get(rlKey);
|
const rl = await this.client.keyv.get(rlKey);
|
||||||
if (rl) {
|
if (rl) {
|
||||||
const embed = new EmbedBuilder()
|
const embed = new EmbedBuilder()
|
||||||
|
Loading…
Reference in New Issue
Block a user