The weeb for the next gen discord boat - Wamellow wamellow.com
bot discord
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

remove (broken) stats from homepage

Luna 39e0541c 32e1e955

+8 -57
+8 -8
app/(home)/page.tsx
··· 33 33 import Commands from "./commands.component"; 34 34 import Faq from "./faq.component"; 35 35 import Ratings from "./ratings.component"; 36 - import Stats from "./stats.component"; 37 36 38 37 const montserrat = Montserrat({ subsets: ["latin"] }); 39 38 const handwritten = Patrick_Hand({ subsets: ["latin"], weight: "400" }); 40 39 41 - export const revalidate = 3600; 40 + export const revalidate = 43200; 42 41 43 - const fetchOptions = { headers: { Authorization: process.env.API_SECRET as string }, next: { revalidate: 60 * 60 } }; 42 + const fetchOptions = { 43 + headers: { 44 + Authorization: process.env.API_SECRET as string 45 + }, 46 + next: { revalidate: 60 * 60 * 12 } 47 + }; 44 48 45 49 export default async function Home() { 46 50 const topGuilds = await fetch(`${process.env.NEXT_PUBLIC_API}/top-guilds`, fetchOptions) ··· 62 66 bot: false 63 67 } 64 68 : undefined, 65 - 66 69 user: { 67 70 username: "Wamellow", 68 71 avatar: "/waya-v3-small.webp", ··· 506 509 style={{ backgroundColor: "rgb(43, 45, 49)" }} 507 510 > 508 511 <DiscordMessage {...messageProps("anime")}> 509 - <Highlight mode={"DARK"} text="Please help us on [top.gg](https://top.gg/bot/1125449347451068437/vote), only takes a few seconds" /> 510 512 <Image 511 513 alt="" 512 514 className="rounded-md shadow-md w-64 md:w-56 lg:w-72 md:w-unset max-w-xs mt-2" ··· 834 836 835 837 <Commands /> 836 838 837 - <Stats /> 838 - 839 - </div > 839 + </div> 840 840 ); 841 841 }
-49
app/(home)/stats.component.tsx
··· 1 - import { StatsBar } from "@/components/counter"; 2 - import { defaultFetchOptions } from "@/lib/api"; 3 - import { convertMonthToName } from "@/utils/time"; 4 - 5 - export interface Statistics { 6 - approximateGuildCount: number; 7 - guildsGained: number; 8 - approximateUserCount: number; 9 - usersGained: number; 10 - approximateVoteCount: number; 11 - votesGained: number; 12 - globalGuilds: number; 13 - } 14 - 15 - export default async function Stats() { 16 - const stats = await fetch(`${process.env.NEXT_PUBLIC_API}/statistics`, defaultFetchOptions) 17 - .then((res) => res.json()) 18 - .catch(() => null) as Statistics | null; 19 - 20 - return ( 21 - <StatsBar 22 - items={[ 23 - { 24 - name: "Guilds using us", 25 - number: stats?.approximateGuildCount || 0, 26 - gained: stats?.guildsGained 27 - }, 28 - { 29 - name: "Users using us", 30 - number: stats?.approximateUserCount || 0, 31 - gained: stats?.usersGained || 0 32 - }, 33 - { 34 - name: "Votes for us", 35 - number: stats?.approximateVoteCount || 0, 36 - gained: stats?.votesGained || 0, 37 - append: `in ${convertMonthToName(new Date().getMonth())}` 38 - }, 39 - { 40 - name: "Our experience with", 41 - number: stats?.globalGuilds || 0, 42 - gained: "guilds, 5 apps", 43 - info: "https://discordlist.gg/user/821472922140803112" 44 - } 45 - ]} 46 - /> 47 - ); 48 - 49 - }