logging fix
This commit is contained in:
parent
ef5709b6a6
commit
509147d651
|
@ -86,11 +86,15 @@ export const interactionCreateHandler = async (interaction: Interaction) => {
|
||||||
if (ownerId === userInteractingId) {
|
if (ownerId === userInteractingId) {
|
||||||
const botMsg: DiscordenoMessage = await structures.createDiscordenoMessage(interaction.message);
|
const botMsg: DiscordenoMessage = await structures.createDiscordenoMessage(interaction.message);
|
||||||
if (botMsg && botMsg.messageReference) {
|
if (botMsg && botMsg.messageReference) {
|
||||||
const rollMsg: DiscordenoMessage = await getMessage(
|
const rollMsg = await getMessage(BigInt(botMsg.messageReference.channelId ?? '0'), BigInt(botMsg.messageReference.messageId ?? '0')).catch((e) =>
|
||||||
BigInt(botMsg.messageReference.channelId ?? '0'),
|
utils.commonLoggers.messageGetError(
|
||||||
BigInt(botMsg.messageReference.messageId ?? '0'),
|
'interactionCreate.ts:92',
|
||||||
|
botMsg.messageReference?.channelId ?? '0',
|
||||||
|
botMsg.messageReference?.messageId ?? '0',
|
||||||
|
e,
|
||||||
|
)
|
||||||
);
|
);
|
||||||
if (!rollMsg.isBot) {
|
if (rollMsg && !rollMsg.isBot) {
|
||||||
ackInteraction(interaction);
|
ackInteraction(interaction);
|
||||||
messageCreateHandler(rollMsg);
|
messageCreateHandler(rollMsg);
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue