Satan1c
Satan1c
Explore posts from servers
DIdiscord.js - Imagine ❄
Created by Satan1c on 11/3/2023 in #djs-questions
[Unknown Interaction] from any deferReply, and from some editReply/reply
as an example of usage:
export class MyService {
constructor(@Inject('client') client: Client) {
this.client = client;
this.client.on('interactionCreate', this.onInteraction.bind(this));
}
async onInteraction(interaction: BaseInteraction) {
if (!interaction.isCommand()) return;
await interaction.deferReply({ ephemeral: true });
await this.serviceCommanbds.execute(interaction);
}
}
export class MyService {
constructor(@Inject('client') client: Client) {
this.client = client;
this.client.on('interactionCreate', this.onInteraction.bind(this));
}
async onInteraction(interaction: BaseInteraction) {
if (!interaction.isCommand()) return;
await interaction.deferReply({ ephemeral: true });
await this.serviceCommanbds.execute(interaction);
}
}
no matter where I put deferReply first 3-4 usage of command will trigger error, sometimes on 3+ usages it executes normally bot ping on host->discord 80-100ms, so it mustn't be a "long response"
14 replies
CC#
Created by Satan1c on 2/6/2023 in #help
❔ Can't use Aot publish format with MongoDB
Hello. I'd like to publish my bot with MongoDB, in AOT format, to make it consume less memory, but it runs into an error. Is the MongoDB not supported for AOT publishing ? I'm getting No suitable constructor found for serializer type: 'MongoDB.Bson.Serialization.Serializers.UInt64Serializer' error. May I use some SQL db ?
2 replies