diff --git a/package.json b/package.json index c6d0a6c..6fbf7e9 100644 --- a/package.json +++ b/package.json @@ -16,13 +16,6 @@ "@auth/core": "^0.19.0", "@auth/drizzle-adapter": "^0.3.12", "@auth/solid-start": "0.1.2", - "@fortawesome/fontawesome-svg-core": "^6.5.1", - "@fortawesome/pro-duotone-svg-icons": "^6.5.1", - "@fortawesome/pro-light-svg-icons": "^6.5.1", - "@fortawesome/pro-regular-svg-icons": "^6.5.1", - "@fortawesome/pro-solid-svg-icons": "^6.5.1", - "@fortawesome/pro-thin-svg-icons": "^6.5.1", - "@fortawesome/sharp-solid-svg-icons": "^6.5.1", "@solidjs/meta": "^0.29.2", "@solidjs/router": "^0.10.9", "@solidjs/start": "^0.4.9", diff --git a/src/app.tsx b/src/app.tsx index bb7de6e..1ed0579 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -1,5 +1,4 @@ // @refresh reload -import "@fortawesome/fontawesome-svg-core/styles.css"; import { Meta, MetaProvider, Title } from "@solidjs/meta"; import { Router } from "@solidjs/router"; import { FileRoutes } from "@solidjs/start"; diff --git a/src/components/FontAwesomeIcon.tsx b/src/components/FontAwesomeIcon.tsx deleted file mode 100644 index 536a4bc..0000000 --- a/src/components/FontAwesomeIcon.tsx +++ /dev/null @@ -1,151 +0,0 @@ -import { - FaSymbol, - FlipProp, - IconDefinition, - IconProp, - PullProp, - RotateProp, - SizeProp, - Transform, -} from "@fortawesome/fontawesome-svg-core"; -import { type JSX } from "solid-js"; - -export interface FontAwesomeIconProps - extends Omit< - JSX.SvgSVGAttributes, - "children" | "mask" | "transform" - > { - icon: IconDefinition; - mask?: IconProp; - maskId?: string; - color?: string; - spin?: boolean; - spinPulse?: boolean; - spinReverse?: boolean; - pulse?: boolean; - beat?: boolean; - fade?: boolean; - beatFade?: boolean; - bounce?: boolean; - shake?: boolean; - flash?: boolean; - border?: boolean; - fixedWidth?: boolean; - inverse?: boolean; - listItem?: boolean; - flip?: FlipProp; - size?: SizeProp; - pull?: PullProp; - rotation?: RotateProp; - transform?: string | Transform; - symbol?: FaSymbol; - style?: JSX.CSSProperties; - tabIndex?: number; - title?: string; - titleId?: string; - swapOpacity?: boolean; -} - -const idPool = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; -function nextUniqueId() { - let size = 12; - let id = ""; - - while (size-- > 0) { - id += idPool[(Math.random() * 62) | 0]; - } - - return id; -} - -function Path(props: { d: string | string[] }) { - return ( - <> - {typeof props.d === "string" ? ( - - ) : ( - <> - - - - )} - - ); -} - -export function FontAwesomeIcon(props: FontAwesomeIconProps) { - const titleId = () => - props.title - ? "svg-inline--fa-title-".concat(props.titleId || nextUniqueId()) - : undefined; - // Get CSS class list from the props object - function attributes() { - const defaultClasses = { - "svg-inline--fa": true, - [`fa-${props.icon.iconName}`]: true, - [props.class ?? ""]: - typeof props.class !== "undefined" && props.class !== null, - ...props.classList, - }; - - // map of CSS class names to properties - const faClasses = { - "fa-beat": props.beat, - "fa-fade": props.fade, - "fa-beat-fade": props.beatFade, - "fa-bounce": props.bounce, - "fa-shake": props.shake, - "fa-flash": props.flash, - "fa-spin": props.spin, - "fa-spin-reverse": props.spinReverse, - "fa-spin-pulse": props.spinPulse, - "fa-pulse": props.pulse, - "fa-fw": props.fixedWidth, - "fa-inverse": props.inverse, - "fa-border": props.border, - "fa-li": props.listItem, - "fa-flip": typeof props.flip !== "undefined" && props.flip !== null, - "fa-flip-horizontal": - props.flip === "horizontal" || props.flip === "both", - "fa-flip-vertical": props.flip === "vertical" || props.flip === "both", - [`fa-${props.size}`]: - typeof props.size !== "undefined" && props.size !== null, - [`fa-rotate-${props.rotation}`]: - typeof props.rotation !== "undefined" && props.size !== null, - [`fa-pull-${props.pull}`]: - typeof props.pull !== "undefined" && props.pull !== null, - "fa-swap-opacity": props.swapOpacity, - }; - - const attributes = { - focusable: !!props.title, - "aria-hidden": !props.title, - role: "img", - xmlns: "http://www.w3.org/2000/svg", - "aria-labelledby": titleId(), - "data-prefix": props.icon.prefix, - "data-icon": props.icon.iconName, - "data-fa-transform": props.transform, - "data-fa-mask": props.mask, - "data-fa-mask-id": props.maskId, - "data-fa-symbol": props.symbol, - tabIndex: props.tabIndex, - classList: { ...defaultClasses, ...faClasses }, - color: props.color, - style: props.style, - viewBox: `0 0 ${props.icon.icon[0]} ${props.icon.icon[1]}`, - } as const; - - // return the complete class list - return attributes; - } - - return ( - - {/* - {props.title} - */} - - - ); -} diff --git a/src/components/NavBar.tsx b/src/components/NavBar.tsx index fffda85..85e6f0d 100644 --- a/src/components/NavBar.tsx +++ b/src/components/NavBar.tsx @@ -1,7 +1,5 @@ -import { faCirclePlus } from "@fortawesome/pro-regular-svg-icons"; import { JSX, Show, Suspense } from "solid-js"; import "../styles/components/NavBar.scss"; -import { FontAwesomeIcon } from "./FontAwesomeIcon"; import NavUser from "./NavUser"; export function Li(props: { @@ -42,9 +40,7 @@ function NavBar() {
  • - -
  • + /> diff --git a/src/components/NavUser.tsx b/src/components/NavUser.tsx index 6fd3fa9..bb783e7 100644 --- a/src/components/NavUser.tsx +++ b/src/components/NavUser.tsx @@ -1,48 +1,20 @@ -import { getSession } from "@auth/solid-start"; import { signIn, signOut } from "@auth/solid-start/client"; -import { - faArrowRightFromBracket, - faArrowRightToBracket, - faGear, -} from "@fortawesome/pro-regular-svg-icons"; -import { eq } from "drizzle-orm"; import { Show, createResource } from "solid-js"; -import { getRequestEvent } from "solid-js/web"; -import db from "~/drizzle"; -import { users } from "~/drizzle/schema"; -import { authOptions } from "~/server/auth"; -import { FontAwesomeIcon } from "./FontAwesomeIcon"; import { Li } from "./NavBar"; -const initialUser = { - id: "", - name: null as string | null, - email: "", - emailVerified: null as Date | null, - image: null as string | null, -}; - async function getUser() { "use server"; - const event = getRequestEvent(); - if (!event) - return { success: false, message: "No request event!", ...initialUser }; + const userFromDB = { + id: "0e628cb0-3746-45b5-8c8c-b04765993215", + name: "user", + email: "test@email.de", + emailVerified: null, + image: + "https://cdn.discordapp.com/avatars/374307020351733770/2cc4c2f03439de4143976034db0e7c53.png", + }; - const session = await getSession(event.request, authOptions); - if (!session?.user?.id) - return { success: false, message: "No user with id!", ...initialUser }; - - const user = ( - await db - .selectDistinct() - .from(users) - .where(eq(users.id, session.user?.id)) - .limit(1) - .execute() - )[0]; - - return { success: true, message: "", ...user }; + return { success: true, message: "", ...userFromDB }; } function NavUser() { @@ -62,24 +34,15 @@ function NavUser() { href="#" name="Login" action={() => signIn("discord", { callbackUrl: "/config" })} - > - - + /> } >
  • User pfp -
  • -
  • signOut({ callbackUrl: "/" })}> - -
  • +
  • signOut({ callbackUrl: "/" })} /> ); } diff --git a/src/routes/[...404].tsx b/src/routes/[...404].tsx deleted file mode 100644 index ef4ef50..0000000 --- a/src/routes/[...404].tsx +++ /dev/null @@ -1,23 +0,0 @@ -import { Title } from "@solidjs/meta"; -import { HttpStatusCode } from "@solidjs/start"; -import Layout from "~/components/Layout"; -import "../styles/pages/index.scss"; - -export default function NotFound() { - return ( - - Not Found - -
    -

    404 - Whoops, ink spill!

    -
    li'l Judd couldn't find this turf.
    -
    -

    - Head back to base and splat into action from there! - 🦑🕹️ -

    -
    -
    -
    - ); -} diff --git a/src/routes/about.tsx b/src/routes/about.tsx deleted file mode 100644 index 046e9ae..0000000 --- a/src/routes/about.tsx +++ /dev/null @@ -1,78 +0,0 @@ -import Layout from "~/components/Layout"; -import "../styles/pages/about.scss"; - -function about() { - return ( - -

    About

    -
    -

    Why does this bot exist?

    -

    - We had a person in our team, who sent{" "} - - these planning messages - {" "} - and I thought that this should be automated. Some time later the first - version of li'l Judd was born. Today the bot has more features and - keeps getting more of them! It is designed to actually improve the - Splatoon experience and not be the 10000th moderation and general - utility bot with the same features as all bots. -

    -
    -
    -

    Who is behind this?

    -

    - The bot is currently being developed by{" "} - moonleay (hey that's me!) with occasional - help from his friends! -

    -
    -
    -

    How can I trust you?

    -

    - The bot only requests permissions, which are needed for it to work. - Additionally, if you want to check how the bot works under the hood, - you can - - read the code - - and if you still don't trust me, you can always host the bot yourself! - A guide on how to do that can be found in the README of the git - project. -

    -
    -
    -

    Where is my data stored?

    -

    - Your data is stored on a VPS from Contabo in Germany. The bot used to - be hosted on a server in my basement, but I moved it to a VPS, because - my internet connection was not stable enough. -

    -
    -
    -

    So whats in the future?

    -

    - I plan on adding features, which are aimed to improve your and your - teams competitive experience! You can check out my public todo list{" "} - - here - - . -

    -
    -
    -

    Hey, there is this really cool idea I have! Can you add it?

    -

    - Just message me! I can't promise anything, but I am always open to new - ideas and improvements! You can find ways to contact me{" "} - here. -

    -
    -
    - ); -} - -export default about; diff --git a/src/routes/acknowledgements.tsx b/src/routes/acknowledgements.tsx deleted file mode 100644 index 4f225c5..0000000 --- a/src/routes/acknowledgements.tsx +++ /dev/null @@ -1,196 +0,0 @@ -import Layout from "~/components/Layout"; -import "../styles/pages/acknowledgements.scss"; - -function acknowledgements() { - return ( - -

    Acknowledgements

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    tool

    -
    -

    license

    -
    -

    page

    -
    -

    Kotlin

    -
    - - Apache license 2.0 - - - - website - -
    -

    Kord

    -
    - - MIT license - - - - website - -
    -

    Kord Extensions

    -
    - - Mozilla Public License 2.0 - - - - website - -
    -

    PostgreSQL

    -
    - - PostgreSQL license - - - - website - -
    -

    kotlinx-coroutines-core

    -
    - - Apache license 2.0 - - - - repo - -
    -

    slf4j

    -
    - - MIT license - - - - website - -
    -

    Exposed

    -
    - - Apache license 2.0 - - - - repo - -
    -

    Krontab

    -
    - - Apache license 2.0 - - - - repo - -
    -

    Splatoon3.ink

    -
    - - MIT License - - - - website - -
    -
    -
    - ); -} - -export default acknowledgements; diff --git a/src/routes/api/auth/[...solidauth].ts b/src/routes/api/auth/[...solidauth].ts deleted file mode 100644 index 724f269..0000000 --- a/src/routes/api/auth/[...solidauth].ts +++ /dev/null @@ -1,4 +0,0 @@ -import { SolidAuth } from "@auth/solid-start" -import { authOptions } from "~/server/auth" - -export const { GET, POST } = SolidAuth(authOptions) diff --git a/src/routes/config/[guildId].tsx b/src/routes/config/[guildId].tsx index 04501dc..90d40bd 100644 --- a/src/routes/config/[guildId].tsx +++ b/src/routes/config/[guildId].tsx @@ -1,18 +1,7 @@ -import { getSession } from "@auth/solid-start"; -import { faToggleOff, faToggleOn } from "@fortawesome/pro-regular-svg-icons"; -import { useNavigate, useParams } from "@solidjs/router"; -import { eq } from "drizzle-orm"; -import moment from "moment-timezone"; -import createClient from "openapi-fetch"; +import { useParams } from "@solidjs/router"; import { Index, createEffect, createResource, createSignal } from "solid-js"; import { createStore } from "solid-js/store"; -import { getRequestEvent } from "solid-js/web"; -import { FontAwesomeIcon } from "~/components/FontAwesomeIcon"; import Layout from "~/components/Layout"; -import db from "~/drizzle"; -import { accounts } from "~/drizzle/schema"; -import { authOptions } from "~/server/auth"; -import { paths } from "~/types/discord"; import "../../styles/pages/config.scss"; const guessTZ = () => Intl.DateTimeFormat().resolvedOptions().timeZone; @@ -34,38 +23,26 @@ const getPayload = async ( | (ReturnType & { success: true }) > => { "use server"; - const event = getRequestEvent(); - if (!event) return { success: false, message: "No request event!" }; - const session = await getSession(event.request, authOptions); - if (!session?.user?.id) - return { success: false, message: "No user with id!" }; + const { DISCORD_ACCESS_TOKEN } = { + DISCORD_ACCESS_TOKEN: "not_for_the_public", + }; + console.log({ DISCORD_ACCESS_TOKEN }); - const { DISCORD_ACCESS_TOKEN } = ( - await db - .selectDistinct({ DISCORD_ACCESS_TOKEN: accounts.access_token }) - .from(accounts) - .where(eq(accounts.userId, session.user?.id)) - .limit(1) - .execute() - )[0]; - if (!DISCORD_ACCESS_TOKEN) - return { success: false, message: "No discord access token!" }; + await fetch("https://jsonplaceholder.typicode.com/todos/1") + .then(() => console.log("fine", Date.now())) + .catch(() => console.log("not fine (doesn't matter)", Date.now())); - // const guilds = await fetch("https://discord.com/api/users/@me/guilds", { - // headers: { Authorization: `Bearer ${DISCORD_ACCESS_TOKEN}` }, - // }).then((res) => res.json()); - const { GET } = createClient({ - baseUrl: "https://discord.com/api/v10", - }); - const { data: guilds, error } = await GET("/users/@me/guilds", { - headers: { Authorization: `Bearer ${DISCORD_ACCESS_TOKEN}` }, - }); - - if (error) { - console.log(error); - return { success: false, message: "Error on discord api request!" }; - } + const guilds = [ + { + id: "598539452343648256", + name: "testServer", + icon: null, + owner: false, + permissions: "562954323421311", + features: ["SOUNDBOARD"], + }, + ]; const guild = guilds?.find((e) => e.id === id); @@ -91,13 +68,12 @@ const getPayload = async ( // guild: guilds // .filter((e: any) => e.permissions & (1 << 5)) // .map((e: any) => e.name), - tzNames: moment.tz.names(), + tzNames: [guessTZ()], }; }; function config() { const params = useParams(); - const navigator = useNavigate(); let [timezoneRef, setTimezoneRef] = createSignal(); let [timePlanningRef, setTimePlanningRef] = createSignal(); let [pingableRolesRef, setPingableRolesRef] = @@ -109,7 +85,6 @@ function config() { if (!payload.success) { console.log(payload.message, "No success"); - navigator("/config", { replace: false }); return initialValue(params); } return payload; @@ -209,12 +184,6 @@ function config() {

    Configure the features of the bot

    ({ - success: null as boolean | null, - guilds: [] as { - id: string; - name: string; - icon: string | null | undefined; - }[], -}); - -const getPayload = async (): Promise< - | { success: false; message: string } - | (ReturnType & { success: true }) -> => { - ("use server"); - const event = getRequestEvent(); - if (!event) return { success: false, message: "No request event!" }; - - const session = await getSession(event.request, authOptions); - if (!session?.user?.id) - return { success: false, message: "No user with id!" }; - - const { DISCORD_ACCESS_TOKEN } = ( - await db - .selectDistinct({ DISCORD_ACCESS_TOKEN: accounts.access_token }) - .from(accounts) - .where(eq(accounts.userId, session.user?.id)) - .limit(1) - .execute() - )[0]; - if (!DISCORD_ACCESS_TOKEN) - return { success: false, message: "No discord access token!" }; - - const { GET } = createClient({ - baseUrl: "https://discord.com/api/v10", - }); - const { data: guilds, error } = await GET("/users/@me/guilds", { - headers: { Authorization: `Bearer ${DISCORD_ACCESS_TOKEN}` }, - }); - - console.log("guilds", guilds); - - if (error) { - console.log(error); - return { success: false, message: "Error on discord api request!" }; - } - - return { - success: true, - guilds: - guilds - ?.filter((e) => parseInt(e.permissions) & (1 << 5)) - .map(({ id, name, icon }) => ({ id, name, icon })) ?? [], - }; -}; - -function index() { - const navigator = useNavigate(); - - const [payload] = createResource(async () => { - const payload = await getPayload(); - - if (!payload.success) { - console.log(payload.message, "No success"); - navigator("/", { replace: false }); - return initialValue(); - } - console.log("success"); - return payload; - }); - - const icons = [faPlus, faCircleExclamation, faBadgeCheck]; - const colors = [undefined, "orange", "green"]; - - return ( - -

    Configure li'l Judd in

    -
    - - {(guild, i) => ( - - Server pfp -

    {guild.name}

    - -
    - )} -
    -
    -
    - ); -} - -export default index; diff --git a/src/routes/contact.tsx b/src/routes/contact.tsx deleted file mode 100644 index cc3508c..0000000 --- a/src/routes/contact.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import Layout from "~/components/Layout"; -import "../styles/pages/contact.scss"; - -function contact() { - return ( - -

    Contact

    -
    - - Email - contact@moonleay.net - - - Discord - @moonleay - - - discord - li'l Judd's home base - -
    -
    - ); -} - -export default contact; diff --git a/src/routes/features.tsx b/src/routes/features.tsx deleted file mode 100644 index 936fbf5..0000000 --- a/src/routes/features.tsx +++ /dev/null @@ -1,51 +0,0 @@ -import ImageSection from "~/components/ImageSection"; -import Layout from "~/components/Layout"; -import "../styles/pages/features.scss"; - -function features() { - return ( - -

    Features

    -
    - - - - - -
    -
    - ); -} - -export default features; diff --git a/src/routes/how-do-i.tsx b/src/routes/how-do-i.tsx deleted file mode 100644 index 4765849..0000000 --- a/src/routes/how-do-i.tsx +++ /dev/null @@ -1,62 +0,0 @@ -import Layout from "~/components/Layout"; -import "../styles/pages/how-do-i.scss"; - -function howDoI() { - return ( - -

    How do I...?

    -
    -

    .. enable / disable certain features?

    -

    - Features can be enabled and disables using the /feature - command. -
    - Example: -

    -
    - A screenshot of the example in Discord. - A screenshot of the example in Discord. - {/*

    /feature feature:Time Planning Feature set:Enable channel:#ich-kann-heute

    */} -
    -
    -
    -

    .. create a match?

    -

    - You can create a match time using the /match command. -
    - Example: -

    -
    - A screenshot of the example in Discord. - A screenshot of the example in Discord. - {/*

    /match match:Ladder Match timestamp:24.12.2069 04:20 opponent:Forbidden

    */} -
    -
    -
    -

    - Is something missing here? -
    - Please contact me! -

    -
    -
    - ); -} - -export default howDoI; diff --git a/src/routes/imprint.tsx b/src/routes/imprint.tsx deleted file mode 100644 index 094eb3e..0000000 --- a/src/routes/imprint.tsx +++ /dev/null @@ -1,62 +0,0 @@ -import Layout from "~/components/Layout"; -import "../styles/pages/imprint.scss"; - -function imprint() { - return ( - -
    -

    Imprint

    -
    - -

    Contact me

    -
    -
    -
    -

    Liability for contents

    -

    - As a service provider, we are responsible for our own content on - these pages in accordance with general legislation pursuant to - Section 7 (1) of the German Telemedia Act (TMG). According to §§ 8 - to 10 TMG, however, we are not obligated as a service provider to - monitor transmitted or stored third-party information or to - investigate circumstances that indicate illegal activity. - Obligations to remove or block the use of information under the - general laws remain unaffected. However, liability in this regard is - only possible from the point in time at which a concrete - infringement of the law becomes known. If we become aware of any - such infringements, we will remove the relevant content immediately. -

    -
    - Source:{" "} - - eRecht24 - -
    -
    -
    -

    Liability for links

    -

    - Our offer contains links to external websites of third parties, on - whose contents we have no influence. Therefore, we cannot assume any - liability for these external contents. The respective provider or - operator of the pages is always responsible for the content of the - linked pages. The linked pages were checked for possible legal - violations at the time of linking. Illegal contents were not - recognizable at the time of linking. However, a permanent control of - the contents of the linked pages is not reasonable without concrete - evidence of a violation of the law. If we become aware of any - infringements, we will remove such links immediately.{" "} -

    -
    - Source:{" "} - - eRecht24 - -
    -
    -
    -
    - ); -} - -export default imprint; diff --git a/src/routes/index.tsx b/src/routes/index.tsx deleted file mode 100644 index 1bc8581..0000000 --- a/src/routes/index.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import Layout from "~/components/Layout"; -import "../styles/pages/index.scss"; - -function index() { - return ( - -
    -

    li'l Judd

    -
    The competetive Splatoon Bot
    -
    -

    Improve your competitive Splatoon experience!

    -

    - See what li'l Judd can help you with: here -

    -
    -
    -
    - ); -} - -export default index; diff --git a/src/routes/privacy-policy.tsx b/src/routes/privacy-policy.tsx deleted file mode 100644 index 874fa78..0000000 --- a/src/routes/privacy-policy.tsx +++ /dev/null @@ -1,178 +0,0 @@ -import Layout from "~/components/Layout"; -import "../styles/pages/privacy-policy.scss"; - -function privacyPolicy() { - return ( - -
    -

    Privacy Policy for li'l Judd

    -

    Last updated: 2023-12-05

    -
    -
    -

    1. Introduction

    -

    - Welcome to li'l Judd! This Privacy Policy explains how we - collect, use, disclose, and safeguard your personal information when - you use our Discord bot service. -

    -
    -
    -

    2. Data Controller

    -

    - The data controller for the processing of your personal data is - moonleay. -
    - Please note that "moonleay" is primarily used as a username and may - not directly reflect my legal or real-world identity. -
    - You can reach me here. -

    -
    -
    -

    3. Information We Collect

    -

    3.1 Discord User Data

    -

    - We may collect and process the following (personal) data related to - your Discord account & guilds: -

    -
      -
    • -

      - Discord User ID

      -
    • -
    • -

      - Discord username, discriminator and IDs of users

      -
    • -
    • -

      - Guild name and ID

      -
    • -
    • -

      - Channel names and IDs of channels with active features

      -
    • -
    • -

      - Message IDs of the bot messages

      -
    • -
    • -

      - Role IDs of created roles

      -
    • -
    -

    3.2 Usage Data

    -

    - We may collect information on how you interact with our bot, including - but not limited to: -

    -
      -
    • -

      - Commands issued

      -
    • -
    • -

      - Server and channel information

      -
    • -
    • -

      - Timestamps of interactions

      -
    • -
    -
    -
    -

    4. How we use your Information

    -

    We process your personal data for the following purposes:

    -
      -
    • -

      - To provide and maintain the bot service.

      -
    • -
    • -

      - To improve, customize, and optimize our bot.

      -
    • -
    • -

      - To respond to your requests, comments, or inquiries.

      -
    • -
    • -

      - To comply with legal obligations.

      -
    • -
    -
    -
    -

    5. Legal Basis for Processing

    -

    We process your personal data on the following legal bases:

    -
      -
    • -

      - - Consent: You have given your consent for the processing of your - personal data for one or more specific purposes. -

      -
    • -
    • -

      - - Performance of a contract: The processing is necessary for the - performance of the agreement between you and us. -

      -
    • -
    -
    -
    -

    6. Data Sharing

    -

    - We do not sell, trade, or otherwise transfer your personal information - to third parties. However, we may share your information with: -

    -
      -
    • -

      - - Third-party service providers involved in the operation and - maintenance of the bot. -

      -
    • -
    -
    -
    -

    7. Data Security

    -

    - We implement reasonable security measures to protect your personal - information from unauthorized access, disclosure, alteration, and - destruction. -

    -
    -
    -

    8. Your Rights

    -

    You have the following rights regarding your personal data:

    -
      -
    • -

      - - Right to withdraw consent: You have the right to withdraw your - consent at any time. You can do this by contacting us at - contact@moonleay.net. -

      -
    • -
    • -

      - - Right to rectification: You can request corrections to - inaccurate or incomplete information. -

      -
    • -
    • -

      - - Right to erasure: You can request the deletion of your personal - data. -

      -
    • -
    -
    -
    -

    9. Changes to this Privacy Policy

    -

    - We may update this Privacy Policy to reflect changes in our practices. - The updated version will be posted on - https://liljudd.ink/privacy-policy. -

    -
    -
    -

    10. Contact Information

    -

    - If you have any questions or concerns about this Privacy Policy, - please contact us at contact@moonleay.net. -

    -
    -
    - ); -} - -export default privacyPolicy; diff --git a/src/routes/stack.tsx b/src/routes/stack.tsx deleted file mode 100644 index 380d4e4..0000000 --- a/src/routes/stack.tsx +++ /dev/null @@ -1,55 +0,0 @@ -import Layout from "~/components/Layout"; -import "../styles/pages/stack.scss"; - -function stack() { - return ( - -

    The Stack

    -
    - Kotlin 'K' logo -
    -

    The Kotlin programming language

    -

    - A programming language, which runs in the JVM. Also my main - language. -

    -
    -
    -
    - The Kord logo -
    -

    The Kord library

    -

    A Kotlin library for creating Discord bots. Pretty bare bones.

    -
    -
    -
    - The Kord-Extensions logo -
    -

    The Kord Extensions library

    -

    A Kotlin library to improve the Kord experience.

    -
    -
    -
    - The PostgreSQL elephant -
    -

    The PostgreSQL database

    -

    - A fast and reliable database. Also something, which I already used - beforehand. -

    -
    -
    -
    -

    - To view all used libraries and their licenses, check the{" "} - Acknowledgements. -

    -
    -
    - ); -} - -export default stack; diff --git a/src/routes/terms-of-service.tsx b/src/routes/terms-of-service.tsx deleted file mode 100644 index 8e78359..0000000 --- a/src/routes/terms-of-service.tsx +++ /dev/null @@ -1,95 +0,0 @@ -import Layout from "~/components/Layout"; -import "../styles/pages/terms-of-service.scss"; - -function termsOfService() { - return ( - -

    Terms of Service

    -
    -

    Usage Agreement

    -

    - By inviting the bot and using its features (commands, planning system) - are you agreeing to the below mentioned Terms and Privacy Policy - (Policy) of the bot. -
    - You acknowledge that you have the privilege to use the bot freely on - any Discord Server (Server) you share with it, that you can invite it - to any Server that you have "Manage Server" rights for and that this - privilege might get revoked for you, if you're subject of breaking the - terms and/or policy of this bot, or the{" "} - - Terms of Service - - ,{" "} - - Privacy Policy - {" "} - and/or{" "} - - Community Guidelines - {" "} - of{" "} - - Discord Inc - - .
    - Through Inviting the bot may it collect specific data as described in - its Policy. -
    - The intended usage of this data is for core functionalities of the bot - such as command handling, guild-specific settings and the - time-planning system. -
    -

    -
    -
    -

    Intended Age

    -

    - The bot may not be used by individuals under the minimal age described - in Discord's Terms of Service. -
    - Doing so will be seen as a violation of these terms and will result in - a removal of the bot from any servers you own. -
    -

    -
    -
    -

    Affiliation

    -

    - The Bot is not affiliated with, supported or made by Discord Inc. -
    - Any direct connection to Discord or any of its Trademark objects is - purely coincidental. We do not claim to have the copyright ownership - of any of Discord's assets, trademarks or other intellectual property. -
    -

    -
    -
    -

    Liability

    -

    - The owner of the bot may not be made liable for individuals breaking - these Terms at any given time. -
    - He has faith in the end users being truthfull about their information - and not misusing this bot or the services of Discord Inc in a - malicious way. -
    - We reserve the right to update these terms at our own discretion, - giving you a 1-Week (7 days) period to opt out of these terms if - you're not agreeing with the new changes. You may opt out by Removing - the bot from any Server you have the rights for. -

    -
    -
    -

    Contact

    -

    - People may get in contact through e-mail at contact@moonleay.net, or - through the official Support Discord of the Bot. Other ways of support - may be provided but aren't guaranteed. -

    -
    -
    - ); -} - -export default termsOfService; diff --git a/src/server/auth.ts b/src/server/auth.ts deleted file mode 100644 index 907d6d2..0000000 --- a/src/server/auth.ts +++ /dev/null @@ -1,38 +0,0 @@ -import Discord from "@auth/core/providers/discord"; -import { DrizzleAdapter } from "@auth/drizzle-adapter"; -import { type SolidAuthConfig } from "@auth/solid-start"; -import db from "~/drizzle"; - -export const authOptions: SolidAuthConfig = { - providers: [ - { - ...Discord({ - clientId: import.meta.env.VITE_DISCORD_CLIENT_ID, - clientSecret: import.meta.env.VITE_DISCORD_CLIENT_SECRET, - }), - authorization: - "https://discord.com/api/oauth2/authorize?scope=identify+email+guilds+guilds.members.read", - }, - ], - adapter: DrizzleAdapter(db), - secret: import.meta.env.VITE_AUTH_SECRET, - callbacks: { - // @ts-ignore - session: ({ session, user }) => { - if (session?.user) { - session.user.id = user.id; - } - return session; - }, - }, - pages: { - // signIn: "/signin", - // signOut: "/signout", - // error: '/auth/error', // Error code passed in query string as ?error= - // verifyRequest: '/auth/verify-request', // (used for check email message) - // newUser: '/auth/new-user' // New users will be directed here on first sign in (leave the property out if not of interest) - }, - redirectProxyUrl: import.meta.env.DEV - ? import.meta.env.VITE_AUTH_REDIRECT_PROXY_URL - : undefined, -};