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

Thread Creation Event is not detected anymore #956

Closed
0cv opened this issue Dec 19, 2023 · 2 comments
Closed

Thread Creation Event is not detected anymore #956

0cv opened this issue Dec 19, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@0cv
Copy link

0cv commented Dec 19, 2023

Which package has the bugs?

The core library

Issue description

I've a well working app which has run fine for over a year so there are things I can easily rule out. I've below a very simplified version of my app showing the issue. Whenever a thread is created, it's not detected as a Thread Create event anymore. Instead, Events.MessageUpdate is fired which might be related to the message on which the thread is created, but no hint showing the creation of a thread.

I do not have exact evidence of when it started to occur but this must be relatively recent (not much more than a week, if I had a guess)

Code sample

import { Client } from 'discord.js-selfbot-v13';
import { Events } from 'discord.js';

const master = new Client({ checkUpdate: false });

master.on('ready', async () => {
    console.log(`Ready`);
    master.on(Events.MessageDelete, messageQueuer(Events.MessageDelete));
    master.on(Events.MessageUpdate, messageQueuer(Events.MessageUpdate));
    master.on(Events.MessageCreate, messageQueuer(Events.MessageCreate));
    master.on(Events.ThreadCreate, threadQueuer(Events.ThreadCreate));
});

master.login('YOUR_TOKEN');

function messageQueuer(messageType) {
    return function (message) {
        console.log('got message', messageType, message);
    }
}

function threadQueuer(messageType) {
    return function (thread, newlyCreated) {
        console.log('new thread', thread.name, thread, newlyCreated);
    }
}


### Package version

updated to latest 2.15.0 (but it failed the same on an older version)

### Node.js version

Node.js 18

### Operating system

Confirmed on OSX and Linux

### Priority this issue should have

High (immediate attention needed)

### Checklist

- [X] I have searched the open issues for duplicates.
- [X] I have shared the entire traceback.
- [X] I am using a user token (and it isn't visible in the code).

### Additional Information

I've checked the latest version of discord.js as well whether `Events.ThreadCreate` had been renamed, but it doesn't appear so (it still is called `threadCreate`)
@0cv 0cv added the bug Something isn't working label Dec 19, 2023
@002-sans
Copy link

002-sans commented Feb 6, 2024

Why are you using the discord.js library?
Just do something like master.on('threadCreate', (thread, newlyCreated) => ...

And check this doc not discord's doc

aiko-chan-ai added a commit that referenced this issue Jul 2, 2024
@aiko-chan-ai
Copy link
Owner

v3.2.0 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants