question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DiscordClient.UserJoined does not appear to be firing anymore

See original GitHub issue

For some time now it appears, that the DiscordClient.UserJoined event is no longer firing.

I am registering my event like this:

            DiscordClient.UserJoined += OnUserJoined;

The event is defined as:

        protected Task OnUserJoined(SocketGuildUser user)
        {
            return Task.Factory.StartNew(() =>
            {
                 [...]
            });
        }

Other events fire fine. However this specific event does not appear to be firing when a new user joins a server the bot is on. It does not hit any debug points.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
RononDexcommented, Nov 27, 2020

Just got it working by enabling the intents on the dev dashboard of the bot in discord. So yeah nightly build isnt needed. Thanks for the help 😃

1reaction
IS4Codecommented, Sep 8, 2021

That is a more recent change where the intent needs to be specified in code as well.

Indeed, but searching for a solution for that had always lead me to allowing privileged intents, despite having them allowed the whole time, so hopefully someone will find the solution now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

User related events aren't firing · Issue #1675 · discord-net ...
Hi all, A bot of mine that has been working perfectly for months recently stopped ... UserJoined += OnUserJoin; // Doesn't work client....
Read more >
Discord.NET: UserJoined Event not being called
I'm building a Discord bot using Discord.NET which is supposed to report a user joining, leaving, being kicked and being banned to a...
Read more >
API Reference - nextcord
This only fires if you do not specify any listeners for command error. ... and is an analogue of user's voice latencies as...
Read more >
Untitled
This is causing a few ... bluestone sunday lunch WebThe error is showing you that ... code examples Web28 ott 2020 · guildMemberAdd...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found