-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #455 from chessebuilderman/Change-Code-Gen-to-Sqli…
…te-Base Change code gen to JSON DB
- Loading branch information
Showing
8 changed files
with
132 additions
and
793 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { UserUpdateEmitter } from './user_update'; | ||
import { user_db_type } from './types'; | ||
|
||
|
||
// eslint-disable-next-line func-names | ||
export default async function() { | ||
const { JSONFilePreset } = await import('lowdb/node'); | ||
const db_pre: user_db_type = { codes: [], events: new Map<string, UserUpdateEmitter>() }; | ||
const code_db = await JSONFilePreset('user_data.json', db_pre); | ||
return code_db; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { UserUpdateEmitter } from './user_update'; | ||
export interface verification_code_data { | ||
interaction: CommandInteraction, | ||
roblox_id: string, | ||
code: string, | ||
expiration: number | ||
event: events.EventEmitter | ||
message_object: Message; | ||
} | ||
|
||
export type user_db_type = { | ||
codes: verification_code_data[]; | ||
events: Map<string, UserUpdateEmitter> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters