generated from lucxjo/template
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>
15 lines
304 B
TypeScript
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,
|
|
},
|
|
});
|
|
}
|
|
}
|