Observed behaviour
I'm developing my own bot and when I use Events.GuildCreate from @fluxerjs/core, the bot lists all guilds it's in every time I start the bot.
Reproduction steps
register the event by calling it on the client, then execute it. here is my event file
Here is a back-to-back test run
import { Events } from "@fluxerjs/core" ;
const guildCreateEvent = {
event : Events . GuildCreate ,
execute : async ( client : any , guild : any ) => {
console . log ( `Joined guild: ${ guild . name } (ID: ${ guild . id } )` );
},
};
export default guildCreateEvent ; * Executing task: npm run start
npm notice run fluxer-getting-started-bot@1.0.0 start
npm notice run tsx src/index.ts
Getting Started Bot is connected to Fluxer.
Command prefix: !
Joined guild: Getting Started (ID: 1548890981661671424)
* The terminal process 'npm run start'" terminated with exit code: 512.
* Terminal will be reused by tasks, press any key to close it.
* Executing task: npm run start
npm notice run fluxer-getting-started-bot@1.0.0 start
npm notice run tsx src/index.ts
Getting Started Bot is connected to Fluxer.
Command prefix: !
Joined guild: Getting Started (ID: 1548890981661671424) Build information
"@fluxerjs/core": "^3.0.0"
Platform
API
10 comments
Comment by Tarek
Comment by @GlitchApotamus
Comment by Tarek
Comment by Hampus
GUILD_CREATElazily after connecting for bots, this is documented clearly in their own docs and I can recreate that behaviour with a raw WebSocket connection currently. If you previously relied on behaviour where it does not, that must be something your bot library has masked for you on Discord previously, which is possible to do if it doesn't let you use the bot until all guilds have arrived asynchronously afterREADY, so this requires no changes to Fluxer source code, but either changes to the library you use, or your expectations of said library.Comment by @GlitchApotamus
Comment by Hampus
GUILD_CREATEs, but bot libraries mask this due to the fact that Discord gives them all guild IDs for free inREADYinguildsas unavailable guilds. Fluxer currently returns an empty array for bots. This is easily fixed, however, and will make doing the same thing here much easier for bot libraries on Fluxer, aligning perfectly with Discord.Comment by @GlitchApotamus
Comment by @GlitchApotamus
Comment by @GlitchApotamus
Comment by Hampus