Skip to content
This repository has been archived by the owner on Oct 12, 2024. It is now read-only.

Commit

Permalink
Initialize
Browse files Browse the repository at this point in the history
  • Loading branch information
RadiatedExodus committed Feb 11, 2024
1 parent ad42fb4 commit 9a23c1a
Show file tree
Hide file tree
Showing 57 changed files with 219 additions and 7,410 deletions.
7 changes: 7 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[*]
charset = utf-8
insert_final_newline = true
end_of_line = lf
indent_style = space
indent_size = 4
max_line_length = 150
8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
config.json
# Compile deps and results
node_modules
.ENV
dist
dist

# Configuration files
.env
4 changes: 3 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@
"semi": true,
"singleQuote": false,
"useTabs": false,
"printWidth": 120
"printWidth": 120,
"endOfLine": "lf",
"trailingComma": "all"
}
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["EditorConfig.EditorConfig", "esbenp.prettier-vscode", "mikestead.dotenv", "prisma.prisma"]
}
14 changes: 14 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Build",
"type": "shell",
"command": "yarn compile",
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
693 changes: 19 additions & 674 deletions LICENSE

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ A Discord bot developed by RadiatedExodus (RealEthanPlayzDev) as a side (and per

Since the ts rewrite, some of the source might ressemble [PojavBot](https://github.com/PojavLauncherTeam/PojavBot) as I took several references from there.

## UNSTABLE - THIS IS A FULL REWRITE
## UNSTABLE - THIS IS A FULL REWRITE (v3)

This branch is a full rewrite, not all features have been implemented!

Expand Down
36 changes: 12 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,47 +1,35 @@
{
"name": "meteorium",
"version": "2.0.0",
"description": "A Discord bot created by RadiatedExodus as a hobby project.",
"version": "3.0.0",
"description": "RadiatedExodus's hobby Discord bot project, built with TypeScript, Prisma, and DiscordJS.",
"main": "dist/index.js",
"type": "module",
"scripts": {
"compile": "tsc",
"start": "node --enable-source-maps --es-module-specifier-resolution=node ."
"start": "node dist"
},
"repository": {
"type": "git",
"url": "git+https://github.com/RealEthanPlayzDev/Meteorium.git"
},
"author": "RadiatedExodus",
"license": "GPL-3.0",
"license": "MIT",
"bugs": {
"url": "https://github.com/RealEthanPlayzDev/Meteorium/issues"
},
"homepage": "https://github.com/RealEthanPlayzDev/Meteorium#readme",
"homepage": "https://github.com/RealEthanPlayzDev/Meteorium",
"devDependencies": {
"prettier": "3.0.3",
"prisma": "^5.2.0",
"typescript": "^5.1.6"
"@types/node": "^20.11.17",
"prettier": "^3.2.5",
"prisma": "^5.9.1",
"typescript": "^5.3.3"
},
"dependencies": {
"@discord-player/extractor": "^4.4.6",
"@discordjs/opus": "^0.9.0",
"@discordjs/voice": "^0.16.1",
"@prisma/client": "^5.9.1",
"@types/ms": "^0.7.32",
"axios": "^1.6.3",
"chalk": "4.0.0",
"discord-player": "^6.6.7",
"chalk": "^5.3.0",
"discord.js": "^14.14.1",
"dotenv": "^16.0.3",
"holodex.js": "^2.0.5",
"libsodium-wrappers": "^0.7.10",
"moment": "^2.29.4",
"ms": "^2.1.3",
"noblox.js": "^4.15.1",
"play-dl": "^1.9.7",
"soundcloud-scraper": "^5.0.3",
"spotify-url-info": "^3.2.13",
"youtube-sr": "^4.3.10",
"ytdl-core": "^4.11.5"
"dotenv": "^16.4.2"
}
}
56 changes: 29 additions & 27 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ generator client {

datasource db {
provider = "postgresql"
url = env("METEORIUMPOSTGRESURL")
url = env("METEORIUM_POSTGRES_URL")
}

model Guild {
GuildId String @unique
EnforceSayInExecutor Boolean @default(false)
DisabledCommands String[] @default([])
DisabledCommandCategories String[] @default([])
PublicModLogChannelId String @default("")
LoggingChannelId String @default("")
JoinLeaveLogChannelId String @default("")
CurrentCaseId Int @default(0)
BanAppealLink String @default("")
GuildId String @unique
EnforceSayInExecutor Boolean @default(false)
JoinLeaveLogChannelId String @default("")
PublicModLogChannelId String @default("")
LoggingChannelId String @default("")
CurrentCaseId Int @default(0)
BanAppealLink String @default("")
ModerationCase ModerationCase[]
Tag Tag[]
}

enum ModerationAction {
Expand All @@ -33,37 +33,24 @@ enum ModerationAction {

model ModerationCase {
GlobalCaseId Int @id @default(autoincrement())
Guild Guild @relation(fields: [GuildId], references: [GuildId], onDelete: Cascade)
GuildId String
CaseId Int
Action ModerationAction
TargetUserId String
ModeratorUserId String
GuildId String
Reason String
AttachmentProof String
AttachmentProof String @default("")
Duration String @default("0")
CreatedAt DateTime @default(now())
ModeratorNote String @default("")
ModeratorAttachment String @default("")
NotAppealable Boolean @default(false)
PublicModLogMsgId String @default("")
CreatedAt DateTime @default(now())
ActiveTempBans ActiveTempBans[]
ModerationCaseHistory ModerationCaseHistory[]
}

model Tag {
GlobalTagId Int @id @default(autoincrement())
TagName String
GuildId String
Content String
Image String
}

model ActiveTempBans {
ActiveTempBanId Int @id @default(autoincrement())
GlobalCaseId Int
Case ModerationCase @relation(fields: [GlobalCaseId], references: [GlobalCaseId], onDelete: Cascade)
}

model ModerationCaseHistory {
ModerationCaseHistoryId Int @id @default(autoincrement())
ModerationCase ModerationCase @relation(fields: [GlobalCaseId], references: [GlobalCaseId], onDelete: Cascade)
Expand All @@ -77,3 +64,18 @@ model ModerationCaseHistory {
ModeratorAttachment String?
NotAppealable Boolean?
}

model ActiveTempBans {
ActiveTempBanId Int @id @default(autoincrement())
GlobalCaseId Int
Case ModerationCase @relation(fields: [GlobalCaseId], references: [GlobalCaseId], onDelete: Cascade)
}

model Tag {
GlobalTagId Int @id @default(autoincrement())
Guild Guild @relation(fields: [GuildId], references: [GuildId], onDelete: Cascade)
GuildId String
TagName String
Content String
Attachment String @default("")
}
Loading

0 comments on commit 9a23c1a

Please sign in to comment.