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

update rank & greet card bg docs

shi.gg dd2ee967 5df62459

verified
Changed files
+46 -40
app
dashboard
[guildId]
greeting
farewell
welcome
leaderboards
notifications
profile
rank
public
+1 -1
app/dashboard/[guildId]/greeting/farewell/page.tsx
··· 127 127 url={`/guilds/${guild?.id}/modules/bye`} 128 128 ratio="aspect-4/1" 129 129 dataName="card.background" 130 - description="Enter a url which should be the background for the image card. The recommended image ratio is 4:1 and recommended resolution 1024x256px." 130 + description="Enter a url which should be the background for the image card. The recommended resolution is 906x256px." 131 131 defaultState={data.card.background || ""} 132 132 disabled={!enabled || (guild!.flags & GuildFlags.FarewellCard) === 0} 133 133 onSave={(s) => {
+1 -1
app/dashboard/[guildId]/greeting/welcome/page.tsx
··· 220 220 url={`/guilds/${guild?.id}/modules/welcome`} 221 221 ratio="aspect-4/1" 222 222 dataName="card.background" 223 - description="Enter a url which should be the background for the image card. The recommended image ratio is 4:1 and recommended resolution 1024x256px." 223 + description="Enter a url which should be the background for the image card. The recommended resolution is 906x256px." 224 224 defaultState={data.card.background || ""} 225 225 disabled={!enabled || (guild!.flags & GuildFlags.WelcomeCard) === 0} 226 226 onSave={(s) => {
+1 -1
app/dashboard/[guildId]/leaderboards/page.tsx
··· 56 56 url={url} 57 57 ratio="aspect-4/1" 58 58 dataName="banner" 59 - description="Enter a url which should be the banner of the leaderboard web page. The recomended image ration is 4:1 and recommended resolution 1024x256px." 59 + description="Enter a url which should be the banner of the leaderboard web page. The recommended resolution is 906x256px." 60 60 defaultState={data.bannerUrl || ""} 61 61 /> 62 62 </div>
+40 -18
app/dashboard/[guildId]/notifications/page.tsx
··· 15 15 import { AvatarBadge } from "@/components/ui/avatar"; 16 16 import { Button } from "@/components/ui/button"; 17 17 import { cacheOptions } from "@/lib/api"; 18 - import { type ApiV1GuildsModulesNotificationsGetResponse, BlueskyNotificationFlags, GuildFlags, NotificationType, TwitchNotificationFlags, YoutubeNotificationFlags } from "@/typings"; 18 + import { type ApiV1GuildsModulesNotificationsGetResponse, BlueskyNotificationFlags, GuildFlags, NotificationFlags, NotificationType, YoutubeNotificationFlags } from "@/typings"; 19 19 import { BitfieldManager, bitfieldToArray, transformer } from "@/utils/bitfields"; 20 20 import { createSelectableItems } from "@/utils/create-selectable-items"; 21 21 import { getCanonicalUrl } from "@/utils/urls"; ··· 155 155 width={24} 156 156 height={24} 157 157 /> 158 - : <div className="size-[24px] flex items-center justify-center bg-wamellow rounded-full select-none font-medium text-sm text-neutral-200"> 158 + : <div className="size-6 flex items-center justify-center bg-wamellow rounded-full select-none font-medium text-sm text-neutral-200"> 159 159 {item.creator.username.slice(0, 2)} 160 160 </div> 161 161 } ··· 225 225 /> 226 226 : <TextInput 227 227 className="md:w-1/2 w-full" 228 - name="Ignore regex" 228 + name={flags.has(NotificationFlags.MustNotMatchRegex) 229 + ? "Blacklist regex" 230 + : "Whitelist regex" 231 + } 229 232 url={url + "/" + item.id} 230 233 dataName="regex" 231 - description="Posts that match the provided regex will be ignored." 234 + description={flags.has(NotificationFlags.MustNotMatchRegex) 235 + ? "Posts that match the provided regex will be ignored." 236 + : "Only posts that match the provided regex will be sent." 237 + } 232 238 defaultState={item.regex || ""} 233 239 onSave={(value) => editItem("regex", value as string)} 234 240 /> 235 241 } 236 242 </div> 237 243 238 - {item.type === NotificationType.Twitch && ( 239 - <Switch 240 - className="mt-2" 241 - label="Delete after stream ends" 242 - endpoint={url + "/" + item.id} 243 - k="flags" 244 - defaultState={(item.flags & TwitchNotificationFlags.DeleteAfterStream) !== 0} 245 - transform={(value) => value ? [TwitchNotificationFlags.DeleteAfterStream] : []} // very fucked up 246 - onSave={(value) => editItem("flags", transformer(value, item.flags, TwitchNotificationFlags.DeleteAfterStream))} 247 - /> 248 - )} 249 - 250 244 {platformFlags && ( 251 245 <TextInput 252 246 className="md:w-1/2 w-full" 253 - name="Ignore regex" 247 + name={flags.has(NotificationFlags.MustNotMatchRegex) 248 + ? "Blacklist regex" 249 + : "Whitelist regex" 250 + } 254 251 url={url + "/" + item.id} 255 252 dataName="regex" 256 - description="Posts that match the provided regex will be ignored." 253 + description={flags.has(NotificationFlags.MustNotMatchRegex) 254 + ? "Posts that match the provided regex will be ignored." 255 + : "Only posts that match the provided regex will be sent." 256 + } 257 257 defaultState={item.regex || ""} 258 258 onSave={(value) => editItem("regex", value as string)} 259 + /> 260 + )} 261 + 262 + <Switch 263 + className="mt-2" 264 + label="Inverted regex (blacklist)" 265 + endpoint={url + "/" + item.id} 266 + k="flags" 267 + defaultState={(item.flags & NotificationFlags.MustNotMatchRegex) !== 0} 268 + transform={(value) => value ? [NotificationFlags.MustNotMatchRegex] : []} // very fucked up 269 + onSave={(value) => editItem("flags", transformer(value, item.flags, NotificationFlags.MustNotMatchRegex))} 270 + /> 271 + 272 + {item.type === NotificationType.Twitch && ( 273 + <Switch 274 + className="mt-2" 275 + label="Delete after stream ends" 276 + endpoint={url + "/" + item.id} 277 + k="flags" 278 + defaultState={(item.flags & NotificationFlags.DeleteAfterStream) !== 0} 279 + transform={(value) => value ? [NotificationFlags.DeleteAfterStream] : []} // very fucked up 280 + onSave={(value) => editItem("flags", transformer(value, item.flags, NotificationFlags.DeleteAfterStream))} 259 281 /> 260 282 )} 261 283
+1 -1
app/profile/rank/page.tsx
··· 84 84 url="/users/@me/rank" 85 85 ratio="aspect-4/1" 86 86 dataName="background" 87 - description="Enter a url which should be the background of your /rank card. The recomended image ration is 4:1 and recommended resolution 1024x256px." 87 + description="Enter a url which should be the background of your /rank card. The recommended resolution is 906x256px." 88 88 defaultState={user?.extended?.rank?.background || ""} 89 89 onSave={(value) => { 90 90 userStore.setState(deepMerge<User>(user, { extended: { rank: { background: value } } }));
+1 -10
public/docs/farewell.md
··· 19 19 <mark> 20 20 Please provide a direct link to the image, not a link to a website containing the image. 21 21 </mark> 22 - <br /> 23 22 24 23 You can create a nice farewell image by **customizing the background for free**. 25 24 26 25 ![farewell image](/welcome.webp) 27 26 28 - Custom background image must be `1024x256px` (width, height) and type of `.png`.<br /> 27 + Custom background image must be `906x256px` (width, height) and type of `.png`, `.jpg`, `.jpeg`, or `.webp`.<br /> 29 28 Please note that `cdn.discordapp.com` no longer works due to [attachment authentication](https://discord.com/channels/613425648685547541/697138785317814292/1157372186160537750), you can upload images to [postimg.cc](https://postimg.cc/) and copy the direct image url. 30 - <br /> 31 - <br /> 32 - 33 - **Example custom backgrounds:** 34 - - [images.wamellow.com/static/grass.jpg](https://images.wamellow.com/static/grass.jpg) 35 - - [images.wamellow.com/static/orange-grass.jpg](https://images.wamellow.com/static/grass.jpg) 36 - - [images.wamellow.com/static/red-grass.jpg](https://images.wamellow.com/static/red-grass.jpg) 37 - - [images.wamellow.com/static/rank.png](https://images.wamellow.com/static/rank.png)
+1 -8
public/docs/greetings.md
··· 19 19 <mark> 20 20 Please provide a direct link to the image, not a link to a website containing the image. 21 21 </mark> 22 - <br /> 23 22 24 23 You can create a nice welcome image by **customizing the background for free**. 25 24 26 25 ![welcome image](/welcome.webp) 27 26 28 - Custom background image must be `1024x256px` (width, height) and type of `.png`.<br /> 27 + Custom background image must be `906x256px` (width, height) and type of `.png`, `.jpg`, `.jpeg`, or `.webp`.<br /> 29 28 Please note that `cdn.discordapp.com` no longer works due to [attachment authentication](https://discord.com/channels/613425648685547541/697138785317814292/1157372186160537750), you can upload images to [postimg.cc](https://postimg.cc/) and copy the direct image url. 30 29 <br /> 31 30 <br /> 32 - 33 - **Example custom backgrounds:** 34 - - [images.wamellow.com/static/grass.jpg](https://images.wamellow.com/static/grass.jpg) 35 - - [images.wamellow.com/static/orange-grass.jpg](https://images.wamellow.com/static/grass.jpg) 36 - - [images.wamellow.com/static/red-grass.jpg](https://images.wamellow.com/static/red-grass.jpg) 37 - - [images.wamellow.com/static/rank.png](https://images.wamellow.com/static/rank.png) 38 31 39 32 ### 🧨 Auto delete 40 33 Automatically delete the welcome message after a certain amount of time. Set to 0 seconds to not delete.