From 50f1d052179f40cb9e59fb71f685aed191a06cf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9B=90=EB=8D=94?= Date: Sun, 31 Jan 2021 12:46:59 +0900 Subject: [PATCH] feat: added addbot route --- pages/addbot.tsx | 146 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 146 insertions(+) create mode 100644 pages/addbot.tsx diff --git a/pages/addbot.tsx b/pages/addbot.tsx new file mode 100644 index 0000000..27e6a00 --- /dev/null +++ b/pages/addbot.tsx @@ -0,0 +1,146 @@ +import { NextPage, NextPageContext } from 'next' +import { useRouter } from 'next/router' +import dynamic from 'next/dynamic' +import Link from 'next/link' +import { Form, Formik } from 'formik' + +import { get } from '@utils/Query' +import { parseCookie, redirectTo } from '@utils/Tools' +import { AddBotSubmitSchema } from '@utils/Yup' +import CheckBox from '@components/Form/CheckBox' +import Label from '@components/Form/Label' +import Input from '@components/Form/Input' +import Divider from '@components/Divider' +import TextArea from '@components/Form/TextArea' +import Segment from '@components/Segment' +import Markdown from '@components/Markdown' +import { categories, library } from '@utils/Constants' +import Select from '@components/Form/Select' +import Selects from '@components/Form/Selects' + +const Container = dynamic(() => import('@components/Container')) +const Message = dynamic(() => import('@components/Message')) +const SEO = dynamic(() => import('@components/SEO')) + +const AddBot:NextPage = ({ logged }) => { + const router = useRouter() + if(!logged) { + localStorage.redirectTo = window.location.href + redirectTo(router, 'login') + return + } + return + +

새로운 봇 추가하기

+ { alert('Submit') }}> + {({ errors, touched, values }) => ( +
+ {JSON.stringify(errors)} + {JSON.stringify(touched)} + +

신청하시기전에 다음 사항을 확인해주세요!

+
    +
  • 디스코드에 참가하셨나요?
  • +
  • 봇이 가이드라인을 지키고 있나요?
  • +
  • 봇 소유자가 두 명 이상인가요? 봇 소유자는 봇이 승인된 뒤, 더 추가하실 수 있습니다.
  • +
  • 본인이 봇의 소유자라는 것을 증명할 수 있나요? 본인이 봇 소유자임을 증명하려면, 태그가 포함되어야합니다.
  • + 다음 명령어(접두사로 시작하는) 중 하나 이상에 소유자를 표시하셔야합니다. + +
      +
    • - 도움 명령어: 도움, 도움말, 명령어, help, commands
    • +
    • - 도움 명령어에 소유자임을 나타내고 싶지 않으시다면, 아래 명령어를 만들어주세요
      + 명령어: [접두사]hellothisisverification 응답: 유저#태그(아이디)
    • +
    +
  • 또한, 봇을 등록하게되면 작성하신 모든 정보는 웹과 API에 공개됩니다.
  • +
+
+ + + + + + + + + + + +