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

Not able to send messages #55

Open
MohamadTaha1 opened this issue Nov 13, 2023 · 1 comment
Open

Not able to send messages #55

MohamadTaha1 opened this issue Nov 13, 2023 · 1 comment

Comments

@MohamadTaha1
Copy link

const Discord = require("./node_modules/discord-user-bots/src/exports.js");
const client = new Discord.Client("blabla");
hey="hello"

client.on.ready = function() {
console.log("Client online!");
};

client.on.message_create = function(message) {
const guild = client.info.guilds.filter((guild) => guild.id == message.guild_id)[0];
const channel = guild.channels.filter((channel) => channel.id == message.channel_id)[0];

if(channel.id=="673488504524898304"){
console.log(message);
client.send(
"673488504524898304", // Channel to send in
{
content: "Hello",});
}
}

I have this code and i dont get why no message is being sent. console.log is working but me sending the message is not

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@MohamadTaha1 and others