import { GetServerSideProps, NextPage } from 'next' import { useState } from 'react' import dynamic from 'next/dynamic' import { NextSeo } from 'next-seo' import { Formik, Form } from 'formik' import { ParsedUrlQuery } from 'querystring' import { DiscordEnpoints, GuildPermissions } from '@utils/Constants' const Container = dynamic(() => import('@components/Container')) const Input = dynamic(() => import('@components/Form/Input')) const Calculator:NextPage = ({ query }) => { const [ value, setValue ] = useState<{[perm: string]: boolean}>({}) const Perm = ({ name, perm, yellow }:{ name: string, perm: number, yellow?: boolean }) => { return
  • } return

    봇 초대링크 생성기

    권한: {Object.keys(value).filter(el => value[el]).map(el => Number(el)).reduce((prev, curr) => prev | curr, 0)} = { Object.keys(value).filter(el => value[el]).map(el => `0x${Number(el).toString(16)}`).join(' | ') }

    일반 권한

      { GuildPermissions.general.map(el => ) }

    멤버쉽 권한

      { GuildPermissions.membership.map(el => ) }

    채팅 채널 권한

      { GuildPermissions.channel.map(el => ) }

    음성 채널 권한

      { GuildPermissions.voice.map(el => ) }

    고급 권한

      { GuildPermissions.advanced.map(el => ) }
    노란색 = 서버에 2단계 인증 필수가 활성화되어있다면, 봇 소유자는 2단계 인증이 완료되어있어야합니다.
    console.log('Pong?')} initialValues={{ id: query.id?.toString() || '', scope: 'bot', redirect: '' }}> { ({ values, setFieldValue }) => (
    봇 ID
    클라이언트 아이디를 입력해주세요.
    스코프 (Scope)
    리다이랙트 URL
    초대완료 후 리다이랙트할 URL입니다.
    ) }
    } export const getServerSideProps: GetServerSideProps = async (ctx) => { return { props: { query: ctx.query } } } interface CalculatorProps { query: ParsedUrlQuery } export default Calculator