er/src/events/guild_join.ts
Louis Hollingworth e8f797d1e0
(#2) Booster roles can now be linked to members.
Next steps:
 * Remove booster roles from the DB and Guild when someone stops
   boosting
 * Add booster roles to the DB and Guild when someone starts boosting

Signed-off-by: Louis Hollingworth <louis@hollingworth.ch>
2023-06-18 12:34:31 +01:00

15 lines
304 B
TypeScript

import { ArgsOf, Discord, On } from "discordx";
import { prisma } from "../main.js";
@Discord()
export class GuildJoin {
@On({ event: "guildCreate" })
fn([guild]: ArgsOf<"guildCreate">) {
prisma.guild.create({
data: {
id: guild.id,
name: guild.name,
},
});
}
}