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 unused variables

Luna 965eb2b7 d5d14afe

+9 -62
+2 -20
app/leaderboard/[guildId]/layout.tsx
··· 7 7 import { ListTab } from "@/components/list"; 8 8 import { getGuild } from "@/lib/api"; 9 9 import paintPic from "@/public/paint.webp"; 10 - import decimalToRgb from "@/utils/decimalToRgb"; 11 10 import { intl } from "@/utils/numbers"; 12 11 import { getCanonicalUrl } from "@/utils/urls"; 13 12 ··· 76 75 77 76 const guildExists = guild && "id" in guild; 78 77 79 - const backgroundRgb = design && "backgroundColor" in design && design.backgroundColor 80 - ? decimalToRgb(design.backgroundColor || 0) 81 - : undefined; 82 - 83 78 return ( 84 79 <div className="w-full"> 85 80 86 - {backgroundRgb && 87 - <style> 88 - {` 89 - :root { 90 - --background-rgb: rgb(${backgroundRgb.r}, ${backgroundRgb.g}, ${backgroundRgb.b}); 91 - } 92 - `} 93 - </style> 94 - } 95 - 96 81 <div className="relative mb-14 w-full"> 97 82 <ClientImageWall 98 83 alt="" ··· 149 134 url={`/leaderboard/${guildId}`} 150 135 searchParamName="type" 151 136 disabled={!guild} 152 - > 153 - {/* {searchParams.type === "voiceminutes" ? pagination.voiceminutes : intl.format(pagination[searchParams.type] || 0)} {searchParams.type} */} 154 - </ListTab> 137 + /> 155 138 156 139 <div className="md:flex"> 157 140 ··· 170 153 <div className="lg:w-1/4 md:w-1/3 mt-8 md:mt-0"> 171 154 <Side 172 155 guild={guild} 173 - design={design} 174 156 pagination={pagination} 175 157 /> 176 158 </div> 177 159 178 160 </div> 179 161 180 - </div > 162 + </div> 181 163 ); 182 164 }
+3 -5
app/leaderboard/[guildId]/page.tsx
··· 6 6 import { getGuild } from "@/lib/api"; 7 7 import SadWumpusPic from "@/public/sad-wumpus.gif"; 8 8 9 - import { getDesign, getPagination, getTopMembers } from "./api"; 9 + import { getPagination, getTopMembers } from "./api"; 10 10 import Member from "./member.component"; 11 11 import Pagination from "./pagination.component"; 12 12 ··· 36 36 const designPromise = getDesign(guildId); 37 37 const paginationPromise = getPagination(guildId); 38 38 39 - const [guild, members, design, pagination] = await Promise.all([guildPromise, membersPromise, designPromise, paginationPromise]).catch(() => []); 39 + const [guild, members, pagination] = await Promise.all([guildPromise, membersPromise, paginationPromise]).catch(() => []); 40 40 41 41 let error = ""; 42 42 if (guild && "message" in guild) error = guild.message; 43 43 if (members && "message" in members) error = members.message; 44 - if (design && "message" in design) error = design.message; 45 44 if (pagination && "message" in pagination) error = pagination.message; 46 45 47 - // wtf is this 48 - if (error || !guild || !members || !design || !pagination || "message" in guild || "message" in members || "message" in design || "message" in pagination) { 46 + if (error || !guild || !members || !pagination || "message" in pagination) { 49 47 return ( 50 48 <ScreenMessage 51 49 top="0rem"
+2 -5
app/leaderboard/[guildId]/side.component.tsx
··· 13 13 import { CopyToClipboardButton } from "@/components/copy-to-clipboard"; 14 14 import Modal from "@/components/modal"; 15 15 import Notice, { NoticeType } from "@/components/notice"; 16 - import type { ApiError, ApiV1GuildsGetResponse, ApiV1GuildsModulesLeaderboardGetResponse, ApiV1GuildsTopmembersPaginationGetResponse } from "@/typings"; 16 + import type { ApiError, ApiV1GuildsGetResponse, ApiV1GuildsTopmembersPaginationGetResponse } from "@/typings"; 17 17 import { intl } from "@/utils/numbers"; 18 18 import { getCanonicalUrl } from "@/utils/urls"; 19 19 20 20 export default function Side({ 21 21 guild, 22 - design, 23 22 pagination 24 23 }: { 25 24 guild: ApiV1GuildsGetResponse | ApiError | undefined; 26 - design: ApiV1GuildsModulesLeaderboardGetResponse | ApiError | undefined; 27 25 pagination: ApiV1GuildsTopmembersPaginationGetResponse | ApiError | undefined; 28 26 }) { 29 27 const cookies = useCookies(); ··· 33 31 34 32 return ( 35 33 <div className="flex flex-col gap-3"> 36 - {!!design} 37 34 38 35 {guild && "id" in guild && 39 36 <div className="flex gap-2 w-full"> ··· 202 199 Are you sure you want to delete the leaderboard? It will be gone forever, probably, who knows. 203 200 </Modal> 204 201 205 - </div > 202 + </div> 206 203 ); 207 204 208 205 }
-15
app/passport/[guildId]/page.tsx
··· 11 11 import { OverviewLink } from "@/components/overview-link"; 12 12 import { getGuild } from "@/lib/api"; 13 13 import paintPic from "@/public/paint.webp"; 14 - import decimalToRgb from "@/utils/decimalToRgb"; 15 14 import { intl } from "@/utils/numbers"; 16 15 import { getCanonicalUrl } from "@/utils/urls"; 17 16 ··· 66 65 67 66 const guildExists = guild && "id" in guild; 68 67 69 - const backgroundRgb = typeof passport === "object" && "backgroundColor" in passport && passport.backgroundColor 70 - ? decimalToRgb(passport.backgroundColor || 0) 71 - : undefined; 72 - 73 68 return ( 74 69 <div className="w-full"> 75 - 76 - {backgroundRgb && 77 - <style> 78 - {` 79 - :root { 80 - --background-rgb: rgb(${backgroundRgb.r}, ${backgroundRgb.g}, ${backgroundRgb.b}); 81 - } 82 - `} 83 - </style> 84 - } 85 70 86 71 {typeof passport === "object" && "message" in passport && 87 72 <Notice type={NoticeType.Error} message={passport.message} />
+2 -17
typings.ts
··· 115 115 116 116 export interface ApiV1GuildsModulesWelcomeGetResponse { 117 117 enabled: boolean; 118 - channelId?: string; 118 + channelId: string | null; 119 119 120 120 message: { 121 121 content?: string; ··· 160 160 161 161 export interface ApiV1GuildsModulesByeGetResponse { 162 162 enabled: boolean; 163 - channelId?: string; 163 + channelId: string | null; 164 164 webhookURL?: string; 165 165 166 166 message: { ··· 232 232 export interface ApiV1GuildsModulesLeaderboardGetResponse { 233 233 bannerUrl: string | null; 234 234 235 - backgroundColor: number | null; 236 - textColor: number | null; 237 - accentColor: number | null; 238 - 239 235 blacklistChannelIds: string[]; 240 236 241 237 roles: { 242 238 messages: string[]; 243 239 voiceminutes: string[]; 244 - // invites: string[]; // again'st tos 245 240 } | undefined; 246 241 247 242 updating: ApiV1GuildsModulesLeaderboardUpdatingPostResponse[]; ··· 267 262 268 263 sendFailedDm: boolean; 269 264 alsoFailIf: ("disposableEmailAddress")[] 270 - 271 - backgroundColor?: number; 272 - textColor?: number; 273 - accentColor?: number; 274 265 } 275 266 276 267 export interface ApiV1UsersMeGetResponse { ··· 328 319 authorId: string; 329 320 330 321 createdAt: Date; 331 - } 332 - 333 - export interface ApiV1GuildsModulesEmbedmessagelinksGetResponse { 334 - enabled: boolean; 335 - color?: number | null; 336 - display: 0 | 1 | 2; 337 322 } 338 323 339 324 export interface ApiV1GuildsModulesNsfwModerationGetResponse {