Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client is not receiving 'messageCreate' events #10310

Closed
seekcat0 opened this issue Jun 1, 2024 · 1 comment
Closed

Client is not receiving 'messageCreate' events #10310

seekcat0 opened this issue Jun 1, 2024 · 1 comment

Comments

@seekcat0
Copy link

seekcat0 commented Jun 1, 2024

Which application or package is this feature request for?

discord.js

Feature

Why does InteractionCreate work with slashcommand but MessageCreate doesn't?
I'll only show this part, it's too long and I don't know if you guys have any idea :<

Ideal solution or implementation

Why not combine "InteractionCreate" and "MessageCreate" to give two functions "interaction.isCommand", "interaction.isMessage"

Alternative solutions or implementations

├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]

Other context

Code:
if (message.author.bot) return;
console.log(message.content)
const channelid = message.channel.id;
if (isAutoBypass[channelid]) {
try {
const content = message.channel.content;
if (content.startsWith("https://flux.li/android/external/start.php?HWID=")) {
if (isDisableCommand("fluxus")) {
await interaction.reply({
embeds: [
{
title: 'Access Denied',
description: Sorry its auto fluxus disable by ${madeby},
color: '15158332',
footer: {
text: Made by ${madeby},
icon_url: footer,
},
}
]
});
return;
}
const userTag = <@${message.user.id}>;
const server = message.guild ? message.guild.name : null;

            if (isUserBlacklisted(userTag) || (server && isServerBlacklisted(server))) {
                await interaction.reply({
                    embeds: [
                        {
                            title: 'Access Denied',
                            description: 'You are not allowed to use this service.',
                            color: '15158332',
                            footer: {
                                text: `Made by ${madeby}`,
                                icon_url: footer,
                            },
                        }
                    ]
                });
                return;
            }
            await AutoFluxus(message, madeby, footer); 
        }
        } catch (err) { console.log(err) }
    }
@Jiralite
Copy link
Member

Jiralite commented Jun 1, 2024

Please use Discord for questions. This issue tracker is for bug reports and feature requests.

@Jiralite Jiralite closed this as not planned Won't fix, can't repro, duplicate, stale Jun 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants