Skip to content

Commit

Permalink
Pending changes exported from your codespace
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnavK-09 committed Jun 16, 2023
1 parent 488e97c commit 9bffb93
Show file tree
Hide file tree
Showing 50 changed files with 503 additions and 271 deletions.
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# 🚩 **RevBots:- Rev Revolt Bots...**
> RevBots is a Revolt bot list website that allows users to showcase their Revolt bots. This repository contains the code for both the ` RevBots ` website and the ` RevBot ` Discord bot.
⚠️ **Website Currently Using Non-Production Database**
⚠️ **Website Currently Using Non-Production Vercel Storage Database**

---
---
Expand All @@ -26,7 +26,7 @@ Welcome to RevBots, a Revolt bot list website showcasing a collection of powerfu
- Explore detailed bot profiles with descriptions, owner, socials etc.
- Easily add bots to your Revolt server with just a click
- Add your own bot easily
- Safe authentication system with Revolt API
- Authentication system with Revolt API
- Better and Modern UI
- Easy to explore and search

Expand Down Expand Up @@ -82,9 +82,6 @@ Visit the [Live Preview](https://rev-bots-tau.vercel.app) to explore RevBots and
## 🧮 License
RevBots and RevBot are both licensed under the ISC License. See the [LICENSE](LICENSE) file for more details.

## ⚡ Version
Latest version for **"RevBots"** repo is **` v0.1.1 `**

> _💫 Feel free to explore, contribute, and enjoy the world of RevBots and RevBot! And don't forget to give a star to this repo..._
---
Expand Down
2 changes: 1 addition & 1 deletion bot/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "revbots-bot",
"version": "0.1.1",
"version": "0.1.3",
"description": "Bot for Rev Bots Site!",
"main": "index.js",
"scripts": {
Expand Down
127 changes: 2 additions & 125 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,128 +1,7 @@
{
"name": "revbots",
"version": "0.1.1",
"version": "0.1.3",
"description": "Mono repo of RevBot's Bot and Website",
"dependencies": {
"acorn": "^8.8.2",
"acorn-jsx": "^5.3.2",
"astring": "^1.8.4",
"bail": "^2.0.2",
"busboy": "^1.6.0",
"ccount": "^2.0.1",
"character-entities": "^2.0.2",
"character-entities-html4": "^2.1.0",
"character-entities-legacy": "^3.0.0",
"character-reference-invalid": "^2.0.1",
"comma-separated-tokens": "^2.0.3",
"debug": "^4.3.4",
"decode-named-character-reference": "^1.0.2",
"dequal": "^2.0.3",
"diff": "^5.1.0",
"esbuild": "^0.17.18",
"estree-util-attach-comments": "^2.1.1",
"estree-util-build-jsx": "^2.2.2",
"estree-util-is-identifier-name": "^2.1.0",
"estree-util-to-js": "^1.2.0",
"estree-util-visit": "^1.2.1",
"estree-walker": "^3.0.3",
"extend": "^3.0.2",
"globrex": "^0.1.2",
"hast-util-to-estree": "^2.3.2",
"hast-util-whitespace": "^2.0.1",
"inline-style-parser": "^0.1.1",
"is-alphabetical": "^2.0.1",
"is-alphanumerical": "^2.0.1",
"is-buffer": "^2.0.5",
"is-decimal": "^2.0.1",
"is-hexadecimal": "^2.0.1",
"is-plain-obj": "^4.1.0",
"is-reference": "^3.0.1",
"kleur": "^4.1.5",
"longest-streak": "^3.1.0",
"markdown-extensions": "^1.1.1",
"mdast-util-definitions": "^5.1.2",
"mdast-util-from-markdown": "^1.3.0",
"mdast-util-mdx": "^2.0.1",
"mdast-util-mdx-expression": "^1.3.2",
"mdast-util-mdx-jsx": "^2.1.2",
"mdast-util-mdxjs-esm": "^1.3.1",
"mdast-util-phrasing": "^3.0.1",
"mdast-util-to-hast": "^12.3.0",
"mdast-util-to-markdown": "^1.5.0",
"mdast-util-to-string": "^3.2.0",
"micromark": "^3.1.0",
"micromark-core-commonmark": "^1.0.6",
"micromark-extension-mdx-expression": "^1.0.4",
"micromark-extension-mdx-jsx": "^1.0.3",
"micromark-extension-mdx-md": "^1.0.1",
"micromark-extension-mdxjs": "^1.0.0",
"micromark-extension-mdxjs-esm": "^1.0.3",
"micromark-factory-destination": "^1.0.0",
"micromark-factory-label": "^1.0.2",
"micromark-factory-mdx-expression": "^1.0.7",
"micromark-factory-space": "^1.0.0",
"micromark-factory-title": "^1.0.2",
"micromark-factory-whitespace": "^1.0.0",
"micromark-util-character": "^1.1.0",
"micromark-util-chunked": "^1.0.0",
"micromark-util-classify-character": "^1.0.0",
"micromark-util-combine-extensions": "^1.0.0",
"micromark-util-decode-numeric-character-reference": "^1.0.0",
"micromark-util-decode-string": "^1.0.2",
"micromark-util-encode": "^1.0.1",
"micromark-util-events-to-acorn": "^1.2.1",
"micromark-util-html-tag-name": "^1.1.0",
"micromark-util-normalize-identifier": "^1.0.0",
"micromark-util-resolve-all": "^1.0.0",
"micromark-util-sanitize-uri": "^1.1.0",
"micromark-util-subtokenize": "^1.0.2",
"micromark-util-symbol": "^1.0.1",
"micromark-util-types": "^1.0.2",
"mri": "^1.2.0",
"ms": "^2.1.2",
"nanoid": "^3.3.6",
"node-bin-setup": "^1.1.3",
"parse-entities": "^4.0.1",
"periscopic": "^3.1.0",
"picocolors": "^1.0.0",
"postcss": "^8.4.23",
"property-information": "^6.2.0",
"remark-mdx": "^2.3.0",
"remark-parse": "^10.0.1",
"remark-rehype": "^10.1.0",
"rollup": "^3.21.6",
"sade": "^1.8.1",
"source-map": "^0.7.4",
"source-map-js": "^1.0.2",
"space-separated-tokens": "^2.0.2",
"streamsearch": "^1.1.0",
"stringify-entities": "^4.0.3",
"style-to-object": "^0.4.1",
"trim-lines": "^3.0.1",
"trough": "^2.1.0",
"tsconfck": "^2.1.1",
"undici": "^5.22.1",
"unified": "^10.1.2",
"unist-util-generated": "^2.0.1",
"unist-util-is": "^5.2.1",
"unist-util-position": "^4.0.4",
"unist-util-position-from-estree": "^1.1.2",
"unist-util-remove-position": "^4.0.2",
"unist-util-stringify-position": "^3.0.3",
"unist-util-visit": "^4.1.2",
"unist-util-visit-parents": "^5.1.3",
"uvu": "^0.5.6",
"vfile": "^5.3.7",
"vfile-location": "^4.1.0",
"vfile-message": "^3.1.4",
"vite": "^4.3.5",
"vite-tsconfig-paths": "^4.2.0",
"zod": "^3.21.4",
"zwitch": "^2.0.4"
},
"devDependencies": {
"node": "^20.2.0"
},
"repository": {
"type": "git",
"url": "git+https://github.com/ArnavK-09/RevBots.git"
Expand All @@ -132,7 +11,5 @@
"bugs": {
"url": "https://github.com/ArnavK-09/RevBots/issues"
},
"homepage": "https://github.com/ArnavK-09/RevBots#readme",
"main": "index.js",
"keywords": []
"homepage": "https://github.com/ArnavK-09/RevBots#readme"
}
8 changes: 5 additions & 3 deletions website/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "revbots-site",
"version": "0.1.1",
"version": "0.1.3",
"description": "Website for Rev Bots!",
"author": "ArnavK-09",
"license": "ISC",
Expand All @@ -20,6 +20,7 @@
"@sveltejs/adapter-vercel": "^3.0.0",
"@sveltejs/kit": "^1.5.0",
"@types/crypto-js": "^4.1.1",
"@types/ms": "^0.7.31",
"@types/showdown": "^2.0.1",
"@typescript-eslint/eslint-plugin": "^5.45.0",
"@typescript-eslint/parser": "^5.45.0",
Expand All @@ -42,10 +43,11 @@
"dependencies": {
"@prisma/client": "^4.15.0",
"@tailwindcss/forms": "^0.5.3",
"@types/node": "^20.2.5",
"@types/node": "^20.3.1",
"axios": "^1.4.0",
"crypto-js": "^4.1.1",
"dotenv": "^16.0.3",
"dotenv": "^16.3.0",
"ms": "^2.1.3",
"showdown": "^2.1.0"
}
}
49 changes: 32 additions & 17 deletions website/prisma/schema.prisma
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema

// Base Prisma
generator client {
provider = "prisma-client-js"
previewFeatures = ["fullTextSearch"]
Expand All @@ -11,14 +9,17 @@ datasource db {
url = env("DB_URL")
}

// Models
model User {
id String @id @default(uuid()) @db.Uuid
username String @unique
identifier String @unique
avatar String @default("/logo.png")
verified Boolean @default(false)
createdAt DateTime @default(now())
bots Bot[]
id String @id @default(uuid()) @db.Uuid
username String
discriminator String
identifier String @unique
avatar String @default("/logo.png")
verified Boolean @default(false)
createdAt DateTime @default(now())
bots Bot[]
vote_timers Vote[]
}

model Bot {
Expand All @@ -34,14 +35,34 @@ model Bot {
support String?
github String
invite String
username String @unique
username String
identifier String @unique
discriminator String
publishedOn DateTime @default(now())
prefix String
status BotStatus @default(PENDING)
promoted Boolean @default(false)
active_votes Vote[]
}

model Request {
code String @id @unique @default("CODE")
status Boolean @default(false)
user String @unique
}

model Vote {
voter User @relation(fields: [voterIdentifier], references: [identifier], onDelete: Cascade)
voterIdentifier String
bot Bot @relation(fields: [botIdentifier], references: [identifier], onDelete: Cascade)
botIdentifier String
key String @unique @default(uuid()) @db.Uuid
time DateTime @default(now())
@@unique([botIdentifier, voterIdentifier])
}

// Enums
enum Tag {
ANIME
FUN
Expand All @@ -61,9 +82,3 @@ enum BotStatus {
DEPRECATED
PENDING
}

model Request {
code String @id @unique @default("CODE")
status Boolean @default(false)
user String @unique
}
1 change: 1 addition & 0 deletions website/src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<head>
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.ico" />
<link rel="apple-touch-icon" href="%sveltekit.assets%/favicon.ico" />
<meta name="viewport" content="width=device-width" />
%sveltekit.head%
</head>
Expand Down
2 changes: 1 addition & 1 deletion website/src/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ body {

/* no scroll bar */
@layer utilities {
@variants responsive {
@layer components {
/* Hide scrollbar for Chrome, Safari and Opera */
.no-scrollbar::-webkit-scrollbar {
display: none;
Expand Down
5 changes: 3 additions & 2 deletions website/src/lib/components/Botpage/Header.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
// props
export let name = 'Revolt Name';
export let description = 'Bot Description';
export let description = 'No Bot Description Provided...';
export let id = 0;
export let avatar = '/favicon.png';
export let actions = true;
</script>

<div class="bg-black/40 md:bg-black/20 mx-8 rounded-lg my-2 py-3 md:py-10">
Expand All @@ -22,7 +23,7 @@
<h1 class="text-5xl font-bold break-all tracking-wide">{name}</h1>
<span class="text-xs opacity-50"> Server ID: #{id}</span>
{#if description} <p class="text-gray-400 text-lg my-2">{description}</p>{/if}
<BotPageActions bot={name} />
{#if actions}<BotPageActions bot={name} />{/if}
</div>
</div>
</div>
4 changes: 4 additions & 0 deletions website/src/lib/components/Botpage/Info.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
name: 'Identifier',
value: data.identifier
},
{
name: 'Discriminator',
value: `#${data.discriminator}`
},
{
name: 'Prefix',
value: data.prefix
Expand Down
2 changes: 1 addition & 1 deletion website/src/lib/components/Botpage/Owner.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
src={avatar}
alt="Owner PFP"
/>
<h5 class="md:text-3xl">
<h5 class="md:text-2xl">
<span class="text-xs mr-3 opacity-80 md:text-lg"> Owned By:</span>@{name}
</h5>
</div>
Expand Down
21 changes: 13 additions & 8 deletions website/src/lib/components/Cards/Bot.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// props
export let id: string;
export let username: string;
export let votes = 0;
export let description: string | null;
export let avatar = '/logo.png';
Expand All @@ -17,14 +18,14 @@
<div class="pt-4 w-full">
<div class="flex gap-x-3">
<div>
<a href={`/@${id}`}>
<a href={`/bot/${id}`}>
<img src={avatar} alt={`${id} Pfp`} class="md:h-16 md:w-16 h-12 w-12 rounded-full" />
</a>
</div>
<div>
<a class="select-none" href={`/@${id}`}>
<a class="select-none" href={`/bot/${id}`}>
<h3 class="text-2xl capitalize font-medium text-red-700">
{id}
{username}
</h3>
<p class="text-sm font-bold text-gray-400 flex">
<span class="text-red-700 mr-1">
Expand All @@ -44,18 +45,22 @@
{/each}
</div>
<div class="gap-x-1 text-center mt-4 grid w-full grid-cols-5">
<a href={`/@${id}/invite`} target="_blank" class="col-span-2 bg-red-200/10 py-3 rounded-lg">
<a
href={`/bot/${id}/invite`}
target="_blank"
class="col-span-2 bg-red-200/10 py-3 rounded-lg"
>
Invite
</a>
<a href={`/@${id}`} class="col-span-2 bg-red-200/10 py-3 rounded-lg"> View </a>
<a href={`/@${id}`} class="bg-red-100/10 py-3 items-center flex justify-center rounded-lg">
<Icon icon="tabler:share" color="#fff" />
<a href={`/bot/${id}`} class="col-span-2 bg-red-200/10 py-3 rounded-lg"> View </a>
<a href={`/bot/${id}`} class="bg-red-100/10 py-3 items-center flex justify-center rounded-lg">
<Icon icon="tabler:share" color="#fff" /> <span class="sr-only">Share</span>
</a>
</div>
</div>
<div class="absolute right-1">
<span
class="rounded-lg flex items-center justify-center m-1.5 w-auto border-2 text-center border-red-700 bg-red-700/10 px-2 py-1.5 text-sm font-thick text-red-700"
class="rounded-lg align-middle font-extrabold flex items-center justify-center m-1.5 w-auto border-2 text-center border-red-700 bg-red-700/10 px-2 py-1.5 text-sm text-red-700"
>
<span class="fill-red-700 mr-px">
<Icon icon="bxs:upvote" width={15} height={15} />
Expand Down
Loading

0 comments on commit 9bffb93

Please sign in to comment.