feat: initialize booster role bot with database and Discord integration
- Add drizzle configuration for SQLite database - Create package.json with necessary dependencies and scripts - Implement configuration loading for Discord bot - Define permissions for roles - Set up database schema for booster roles - Create Discord client and commands for managing booster roles - Handle guild member updates to manage roles based on boost status - Implement boost eligibility checks and role management logic - Add tests for boost eligibility and role guards - Create service for managing booster roles with in-memory storage for testing - Configure TypeScript settings for the project
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
export type BoostEligibilityInput = {
|
||||
verifiedBoostCount: number | null;
|
||||
};
|
||||
|
||||
export function assertBoostEligibility(input: BoostEligibilityInput): void {
|
||||
if (input.verifiedBoostCount === null) {
|
||||
throw new Error("Boost eligibility cannot be verified");
|
||||
}
|
||||
|
||||
if (input.verifiedBoostCount < 2) {
|
||||
throw new Error("User must have at least two server boosts to claim a custom role");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user