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.

tts add announce

Luna 6b4f325c 423db65f

+33 -34
+29 -32
app/dashboard/[guildId]/page.tsx
··· 1 1 "use client"; 2 2 3 - import { Accordion, AccordionItem, Button } from "@nextui-org/react"; 3 + import { Accordion, AccordionItem, Chip } from "@nextui-org/react"; 4 4 import Image from "next/image"; 5 5 import Link from "next/link"; 6 6 import { useParams } from "next/navigation"; 7 7 import { useState } from "react"; 8 - import { BsDiscord } from "react-icons/bs"; 9 8 import { HiChartBar, HiMail } from "react-icons/hi"; 10 9 11 10 import { guildStore } from "@/common/guilds"; 12 - import { userStore } from "@/common/user"; 13 11 import { webStore } from "@/common/webstore"; 14 - import Badge from "@/components/badge"; 15 12 import SelectMenu from "@/components/inputs/SelectMenu"; 13 + import Switch from "@/components/inputs/Switch"; 16 14 import Modal from "@/components/modal"; 17 15 18 16 import OverviewLinkComponent from "../../../components/OverviewLinkComponent"; 19 17 20 18 export default function Home() { 21 19 const web = webStore((w) => w); 22 - const user = userStore((s) => s); 23 20 const guild = guildStore((g) => g); 24 21 25 22 const [modal, setModal] = useState(false); ··· 94 91 <hr className="mt-6 mb-2 dark:border-wamellow-light border-wamellow-100-light" /> 95 92 <span className="dark:text-neutral-500 text-neutral-400 text-sm flex"> 96 93 This option will assign a channel to be the text input method for in-voicechat text to speech. 97 - <Badge text="Beta" /> 94 + <Chip 95 + className="ml-auto" 96 + color="secondary" 97 + variant="flat" 98 + > 99 + Beta 100 + </Chip> 98 101 </span> 99 102 100 103 <div className="lg:flex gap-6 mt-5"> 101 - <div className="lg:w-1/2"> 102 - <SelectMenu 103 - name="Text to Speech channel" 104 - url={`/guilds/${params.guildId}`} 105 - dataName="ttsChannelId" 106 - items={guild?.channels?.sort((a, b) => a.name.localeCompare(b.name)).map((c) => { return { name: `#${c.name}`, value: c.id }; })} 107 - description="Select a channel what channel should be used for tts." 108 - defaultState={guild?.ttsChannelId} 109 - showClear 110 - /> 111 - </div> 104 + {guild?.tts && guild?.channels?.length && 105 + <div className="lg:w-1/2 space-y-8"> 106 + <SelectMenu 107 + name="Text to Speech channel" 108 + url={`/guilds/${params.guildId}`} 109 + dataName="channelId" 110 + items={guild?.channels?.sort((a, b) => a.name.localeCompare(b.name)).map((c) => ({ name: `#${c.name}`, value: c.id }))} 111 + description="Select a channel what channel should be used for tts." 112 + defaultState={guild?.tts.channelId} 113 + showClear 114 + /> 115 + <Switch 116 + name="Announce user" 117 + url={`/guilds/${params.guildId}`} 118 + dataName="announceUser" 119 + description="If I should say who is currently speaking via tts." 120 + defaultState={guild?.tts.announceUser || false} 121 + /> 122 + </div> 123 + } 112 124 <Accordion 113 125 className="lg:w-1/2" 114 126 defaultExpandedKeys={["1"]} ··· 142 154 </Link> 143 155 </AccordionItem> 144 156 </Accordion> 145 - </div> 146 - 147 - <hr className="mt-6 mb-3 dark:border-wamellow-light border-wamellow-100-light" /> 148 - 149 - <div>Hey {user?.username}, thanks for testing out the early version of this bot :)</div> 150 - <div>There will be more exciting stuff coming soon&trade;</div> 151 - 152 - <div className="flex mt-2"> 153 - <Button 154 - as={Link} 155 - href="/support" 156 - startContent={<BsDiscord />} 157 - > 158 - Join our server for updates 159 - </Button> 160 157 </div> 161 158 162 159 </div>
-1
app/layout.tsx
··· 1 - 2 1 import "./globals.css"; 3 2 4 3 import { Metadata, Viewport } from "next";
+4 -1
typings.ts
··· 45 45 id?: string; 46 46 name?: string; 47 47 }; 48 - ttsChannelId?: string | null; 48 + tts: { 49 + channelId: string | null; 50 + announceUser: boolean; 51 + } 49 52 } 50 53 51 54 export interface ApiV1GuildsTopmembersGetResponse {