generated from lucxjo/template
(#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:
parent
6e1e54da1b
commit
e8f797d1e0
7 changed files with 111 additions and 45 deletions
15
src/events/guild_join.ts
Normal file
15
src/events/guild_join.ts
Normal 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,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue