]> git.localhorst.tv Git - alttp.git/blob - resources/js/pages/DiscordBot.js
some discord bot stuff
[alttp.git] / resources / js / pages / DiscordBot.js
1 import React from 'react';
2 import { Button, Container } from 'react-bootstrap';
3 import { useTranslation } from 'react-i18next';
4
5 import Icon from '../components/common/Icon';
6 import Controls from '../components/discord-bot/Controls';
7
8 const authEndpoint = 'https://discord.com/oauth2/authorize';
9 const clientId = process.env.MIX_DISCORD_CLIENT_ID;
10
11 const DiscordBot = () => {
12         const { t } = useTranslation();
13
14         return <Container>
15                 <h1>{t('discordBot.heading')}</h1>
16                 <p>
17                         <span className="button-bar">
18                                 <Button
19                                         href={`${authEndpoint}?client_id=${clientId}&scope=bot%20applications.commands`}
20                                         target="_blank"
21                                         variant="discord"
22                                 >
23                                         <Icon.DISCORD title="" />
24                                         {' '}
25                                         {t('discordBot.invite')}
26                                 </Button>
27                         </span>
28                 </p>
29                 <h2>{t('discordBot.controls')}</h2>
30                 <Controls />
31         </Container>;
32 };
33
34 export default DiscordBot;