feat: switch to revolt.js@6.0.0 + new revolt-api

This commit is contained in:
Paul Makles
2022-04-09 15:47:04 +01:00
parent dc3925c003
commit b2f4411850
91 changed files with 528 additions and 460 deletions

View File

@@ -1,6 +1,5 @@
import { useParams } from "react-router-dom";
import { Permission } from "revolt.js";
import { Route } from "revolt.js/dist/api/routes";
import { API, Permission } from "revolt.js";
import styled from "styled-components/macro";
import { useEffect, useState } from "preact/hooks";
@@ -37,8 +36,7 @@ const Option = styled.div`
export default function InviteBot() {
const { id } = useParams<{ id: string }>();
const client = useClient();
const [data, setData] =
useState<Route<"GET", "/bots/id/invite">["response"]>();
const [data, setData] = useState<API.PublicBot>();
useEffect(() => {
client.bots.fetchPublic(id).then(setData);