mirror of
https://github.com/veganhacktivists/arabot.git
synced 2025-05-18 17:04:15 +02:00
refactor(arabot): change storage of ids
This commit is contained in:
parent
753fdfb57c
commit
5daba2ac3b
@ -61,13 +61,13 @@ export async function addExistingUser(user: GuildMember) {
|
||||
}
|
||||
|
||||
// Checks what roles the user has
|
||||
const hasVegan = user.roles.cache.has(IDs.roles.vegan);
|
||||
const hasActivist = user.roles.cache.has(IDs.roles.activist);
|
||||
const hasPlus = user.roles.cache.has(IDs.roles.plus);
|
||||
const hasVegCurious = user.roles.cache.has(IDs.roles.vegCurious);
|
||||
const hasConvinced = user.roles.cache.has(IDs.roles.convinced);
|
||||
const hasVegan = user.roles.cache.has(IDs.roles.vegan.vegan);
|
||||
const hasActivist = user.roles.cache.has(IDs.roles.vegan.activist);
|
||||
const hasPlus = user.roles.cache.has(IDs.roles.vegan.plus);
|
||||
const hasVegCurious = user.roles.cache.has(IDs.roles.nonvegan.vegCurious);
|
||||
const hasConvinced = user.roles.cache.has(IDs.roles.nonvegan.convinced);
|
||||
const hasTrusted = user.roles.cache.has(IDs.roles.trusted);
|
||||
const hasMuted = user.roles.cache.has(IDs.roles.trusted);
|
||||
const hasMuted = user.roles.cache.has(IDs.roles.restrictions.muted);
|
||||
|
||||
// Create the user in the database
|
||||
await prisma.user.create({
|
||||
@ -82,4 +82,7 @@ export async function addExistingUser(user: GuildMember) {
|
||||
muted: hasMuted,
|
||||
},
|
||||
});
|
||||
|
||||
// Close the database connection
|
||||
await prisma.$disconnect();
|
||||
}
|
||||
|
@ -18,14 +18,25 @@
|
||||
|
||||
const IDs = {
|
||||
roles: {
|
||||
nonvegan: '774763753308815400',
|
||||
vegan: '788114978020392982',
|
||||
activist: '730915638746546257',
|
||||
plus: '798682625619132428',
|
||||
vegCurious: '832656046572961803',
|
||||
convinced: '797132019166871612',
|
||||
trusted: '731563158011117590',
|
||||
muted: '730924813681688596',
|
||||
nonvegan: {
|
||||
nonvegan: '774763753308815400',
|
||||
vegCurious: '832656046572961803',
|
||||
convinced: '797132019166871612',
|
||||
},
|
||||
vegan: {
|
||||
vegan: '788114978020392982',
|
||||
activist: '730915638746546257',
|
||||
plus: '798682625619132428',
|
||||
},
|
||||
restrictions: {
|
||||
sus: '859145930640457729',
|
||||
muted: '730924813681688596',
|
||||
restricted1: '809769217477050369',
|
||||
restricted2: '872482843304001566',
|
||||
restricted3: '856582673258774538',
|
||||
restricted4: '872472182888992858',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user