jei
jei
DIAdiscord.js - Imagine an app
Created by jei on 11/3/2024 in #djs-questions
GuildMemberAdded not working
I can double check without the once, but its seems like weird behavior
35 replies
DIAdiscord.js - Imagine an app
Created by jei on 11/3/2024 in #djs-questions
GuildMemberAdded not working
ok, i just thought about this before making the change, so If i run my bot, it still doesnt detect a user joining, I can run a sim join, but whenever i have a friend join it still doesnt detect
35 replies
DIAdiscord.js - Imagine an app
Created by jei on 11/3/2024 in #djs-questions
GuildMemberAdded not working
assuming that GuildMemberRemove detects when a user is removed ffrom the server, I handle deleting the data
35 replies
DIAdiscord.js - Imagine an app
Created by jei on 11/3/2024 in #djs-questions
GuildMemberAdded not working
ok, yea
35 replies
DIAdiscord.js - Imagine an app
Created by jei on 11/3/2024 in #djs-questions
GuildMemberAdded not working
nope, its cuid
35 replies
DIAdiscord.js - Imagine an app
Created by jei on 11/3/2024 in #djs-questions
GuildMemberAdded not working
are we assuming case of "Leave & Rejoining"?
35 replies
DIAdiscord.js - Imagine an app
Created by jei on 11/3/2024 in #djs-questions
GuildMemberAdded not working
for each command there's a once param so ill tr changing that first cuz the create logic will only push new data to the database, while im here is it possible to check if someone bought a SKU?
35 replies
DIAdiscord.js - Imagine an app
Created by jei on 11/3/2024 in #djs-questions
GuildMemberAdded not working
import dotenv from "dotenv";
import { Client, Collection, Events, GatewayIntentBits } from "discord.js";

import Handler from "./Handler";
import { IClient } from "../interfaces";
import Command from "./Command";
import SubCommand from "./SubCommand";
import EventEmitter from "events";
import { prisma } from "../lib/prisma";

dotenv.config();

export default class OopsieClient extends Client implements IClient {
handler: Handler;
commands: Collection<string, Command>;
subCommands: Collection<string, SubCommand>;
cooldowns: Collection<string, Collection<string, number>>;

constructor() {
super({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMembers] });

this.handler = new Handler(this);
this.commands = new Collection();
this.subCommands = new Collection();
this.cooldowns = new Collection();
}
init(): void {
this.loadHandlers();
this.login(process.env.DISCORD_TOKEN)
.then(() => console.log("Logged In"))
.catch((err) => console.error(err));
}

loadHandlers(): void {
this.handler.loadEvents();
this.handler.loadCommands();
}
}
import dotenv from "dotenv";
import { Client, Collection, Events, GatewayIntentBits } from "discord.js";

import Handler from "./Handler";
import { IClient } from "../interfaces";
import Command from "./Command";
import SubCommand from "./SubCommand";
import EventEmitter from "events";
import { prisma } from "../lib/prisma";

dotenv.config();

export default class OopsieClient extends Client implements IClient {
handler: Handler;
commands: Collection<string, Command>;
subCommands: Collection<string, SubCommand>;
cooldowns: Collection<string, Collection<string, number>>;

constructor() {
super({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMembers] });

this.handler = new Handler(this);
this.commands = new Collection();
this.subCommands = new Collection();
this.cooldowns = new Collection();
}
init(): void {
this.loadHandlers();
this.login(process.env.DISCORD_TOKEN)
.then(() => console.log("Logged In"))
.catch((err) => console.error(err));
}

loadHandlers(): void {
this.handler.loadEvents();
this.handler.loadCommands();
}
}
35 replies
DIAdiscord.js - Imagine an app
Created by jei on 11/3/2024 in #djs-questions
GuildMemberAdded not working
yes
35 replies
DIAdiscord.js - Imagine an app
Created by jei on 11/3/2024 in #djs-questions
GuildMemberAdded not working
cuz its only supposed to run once, is that the incorrect behaviour
35 replies