-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 1943b2e
Showing
11 changed files
with
631 additions
and
0 deletions.
There are no files selected for viewing
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,3 @@ | ||
node_modules | ||
dist | ||
*.doxc |
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,22 @@ | ||
{ | ||
"name": "kts", | ||
"version": "1.0.0", | ||
"description": "'Kigaposts starter'", | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"scripts": { | ||
"build": "tsc", | ||
"start": "node dist/index.js", | ||
"test": "tsc && node dist/index.js" | ||
}, | ||
"keywords": [], | ||
"author": "vKxni", | ||
"license": "MIT", | ||
"dependencies": { | ||
"discord.js": "^14.13.0" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^20.5.9", | ||
"typescript": "^5.2.2" | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { Utils } from "./utils"; | ||
|
||
const content: string = "test"; | ||
|
||
Utils.createDocxFile("test", content); | ||
const validate = Utils.doesDocxFileExist("test"); | ||
|
||
console.log(validate); |
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,145 @@ | ||
import { | ||
Snowflake, | ||
ApplicationCommandDataResolvable, | ||
PermissionResolvable, | ||
Collection, | ||
} from "discord.js"; | ||
|
||
type SnowflakeOrString = Snowflake | string; | ||
|
||
interface RunOptions<T extends Record<string, any>> { | ||
client: ExtendedClient; | ||
interaction: T; | ||
args: string[]; | ||
} | ||
|
||
type RunFunction<T extends Record<string, any>> = (options: RunOptions<T>) => unknown; | ||
|
||
interface ExtendedInteraction<T> { | ||
member: T; | ||
options: Record<string, any>; | ||
} | ||
|
||
interface ExtendedButtonInteraction<T> { | ||
member: T; | ||
fields: Record<string, any>; | ||
} | ||
|
||
interface CommandOptions { | ||
userPermissions?: PermissionResolvable[]; | ||
guildOnly?: boolean; | ||
ownerOnly?: boolean; | ||
directory?: string; | ||
description?: string; | ||
} | ||
|
||
type CommandType<T extends Record<string, any>> = ApplicationCommandDataResolvable & { | ||
run: RunFunction<T>; | ||
options?: CommandOptions; | ||
}; | ||
|
||
interface Verification { | ||
enabled: boolean; | ||
blacklisted: boolean; | ||
visitor: boolean | null; | ||
isVerified: boolean | null; | ||
} | ||
|
||
interface VerificationData { | ||
_id: string; | ||
userID: string; | ||
klasse: string; | ||
email: string; | ||
status: VerificationRequestStatus; | ||
requestedCodes: boolean; | ||
recoveryCodes: string[]; | ||
createdAt: Date; | ||
updatedAt: Date; | ||
__v: number; | ||
} | ||
|
||
interface VerificationFormFields { | ||
"input-klasse": string; | ||
"input-email": string; | ||
} | ||
|
||
type VerificationRequestStatus = "N/A" | "Accepted" | "Declined"; | ||
|
||
interface VerificationRequest { | ||
userID: SnowflakeOrString; | ||
klasse: string; | ||
email: string; | ||
status: VerificationRequestStatus; | ||
} | ||
|
||
interface Datenschutz { | ||
data: VerificationData; | ||
hasRequestedCodes: boolean; | ||
hasDeletedData: boolean; | ||
} | ||
|
||
interface ServerStats { | ||
online: number; | ||
members: number; | ||
verifiedMembers: number; | ||
footer: Array<[string, Date]>; | ||
} | ||
|
||
interface KigaPosts { | ||
_id: string; | ||
guildID: string; | ||
enabled: boolean; | ||
holiday: boolean; | ||
postChannel: string; | ||
__v: number; | ||
} | ||
|
||
interface KigaPostData extends KigaPosts { | ||
messageID: string; | ||
description: string; | ||
avatarURL: string; | ||
footerText: string; | ||
} | ||
|
||
interface AutoResponse { | ||
_id: string; | ||
guildID: string; | ||
enabled: boolean; | ||
trigger: { | ||
trigger: string; | ||
response: string; | ||
}[]; | ||
} | ||
|
||
type MyCollection<T> = Collection<string, T>; | ||
|
||
interface ExtendedClient { | ||
commands: MyCollection<any>; | ||
buttons: MyCollection<any>; | ||
modals: MyCollection<any>; | ||
cooldowns: MyCollection<any>; | ||
verification: MyCollection<any>; | ||
autoResponses: MyCollection<any>; | ||
kigaPosts: MyCollection<any>; | ||
} | ||
|
||
export { | ||
SnowflakeOrString, | ||
RunOptions, | ||
RunFunction, | ||
ExtendedInteraction, | ||
ExtendedButtonInteraction, | ||
CommandOptions, | ||
CommandType, | ||
Verification, | ||
VerificationData, | ||
Datenschutz, | ||
ServerStats, | ||
KigaPosts, | ||
KigaPostData, | ||
AutoResponse, | ||
VerificationFormFields, | ||
VerificationRequest, | ||
MyCollection, | ||
ExtendedClient, | ||
}; |
Oops, something went wrong.