(#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>
This commit is contained in:
Louis Hollingworth 2023-06-18 12:34:31 +01:00
parent 6e1e54da1b
commit e8f797d1e0
Signed by: lucxjo
GPG key ID: A11415CB3DC7809B
7 changed files with 111 additions and 45 deletions

15
src/events/guild_join.ts Normal file
View file

@ -0,0 +1,15 @@
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,
},
});
}
}