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

Configure Feed

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

at master 515 lines 11 kB view raw
1import type { ChannelType } from "discord-api-types/v10"; 2 3import type { actor } from "./utils/tts"; 4 5export interface ApiError { 6 status: number; 7 message: string; 8} 9 10export interface ApiV1TopguildsGetResponse { 11 id: string; 12 name: string; 13 icon: string | null; 14 memberCount: number; 15 16 verified: boolean; 17 partnered: boolean; 18} 19 20export interface ApiV1UsersMeGuildsGetResponse { 21 id: string; 22 name: string; 23 icon: string | null; 24 bot: boolean; 25 manageable?: boolean; 26} 27 28export enum GuildFlags { 29 Premium = 1 << 0, 30 PrivateLeaderboard = 1 << 1, 31 EmbedDiscordLinks = 1 << 2, 32 33 WelcomeEnabled = 1 << 4, 34 FarewellEnabled = 1 << 5, 35 StarboardEnabled = 1 << 6, 36 PassportEnabled = 1 << 7, 37 38 TextToSpeechAnnounceUsers = 1 << 8, 39 TextToSpeechQueueMessages = 1 << 9, 40 TextToSpeechAllowBots = 1 << 10, 41 42 WelcomeRestore = 1 << 11, 43 WelcomeDirectMessage = 1 << 12, 44 WelcomeCard = 1 << 13, 45 WelcomeCardInEmbed = 1 << 14, 46 WelcomeButton = 1 << 15, 47 WelcomeButtonPing = 1 << 16, 48 49 FarewellCard = 1 << 17, 50 FarewellCardInEmbed = 1 << 18, 51 52 StarboardAllowNSFW = 1 << 19, 53 StarboardAllowBots = 1 << 20, 54 StarboardAllowEdits = 1 << 21, 55 StarboardAllowSelf = 1 << 22, 56 StarboardDisplayReference = 1 << 23, 57 StarboardDeleteOnLoss = 1 << 24 58} 59 60export interface ApiV1GuildsGetResponse { 61 id: string; 62 name: string; 63 icon: string | null; 64 banner: string | null; 65 memberCount: number; 66 premiumTier: number; 67 inviteUrl: string | undefined; 68 description: string | null; 69 follownewsChannel?: { 70 id: string; 71 name: string; 72 }; 73 tts: { 74 channelId: string | null; 75 logChannelId: string | null; 76 blacklistRoleId: string | null; 77 priorityRoleId: string | null; 78 maxLength: number | null; 79 }; 80 flags: GuildFlags; 81 style: { 82 username: string | null; 83 avatar: string | null; 84 banner: string | null; 85 }; 86} 87 88export interface ApiV1GuildsStylePatchResponse { 89 username: string | null; 90 avatar: string | null; 91 banner: string | null; 92 bio: string | null; 93} 94 95export interface ApiV1GuildsTopmembersGetResponse { 96 id: string; 97 username: string | null; 98 globalName: string | null; 99 avatar: string | null; 100 bot: true; 101 emoji: string | null; 102 activity: ApiV1UsersMeGetResponse["activity"] & { 103 formattedVoicetime: string; 104 }; 105} 106 107export interface ApiV1GuildsTopmembersPaginationGetResponse { 108 messages: { 109 pages: number; 110 total: number; 111 }; 112 voiceminutes: { 113 pages: number; 114 total: string; 115 formattedTotal: string; 116 }; 117 invites: { 118 pages: number; 119 total: number; 120 }; 121} 122 123export interface ApiV1GuildsChannelsGetResponse { 124 type: ChannelType; 125 name: string; 126 id: string; 127 /** 128 * @description permission bitfield for the bot in the channel 129 */ 130 permissions: number; 131 nsfw: boolean; 132} 133 134export interface ApiV1GuildsRolesGetResponse { 135 name: string; 136 id: string; 137 /** 138 * @description -1 represents the role being above the bot's highest role 139 */ 140 permissions: -1 | 0; 141 position: number; 142 color: number; 143} 144 145export interface ApiV1GuildsEmojisGetResponse { 146 name: string; 147 id: string; 148 animated: boolean; 149} 150 151export interface GuildEmbed { 152 title: string | null; 153 description: string | null; 154 thumbnail: string | null; 155 image: string | null; 156 color: number; 157 footer: { 158 text: string | null; 159 icon_url: string | null; 160 }; 161} 162 163export interface ApiV1GuildsModulesWelcomeGetResponse { 164 channelId: string | null; 165 166 message: { 167 content?: string; 168 embed?: GuildEmbed; 169 }; 170 171 roleIds: string[]; 172 pingIds: string[]; 173 deleteAfter?: number; 174 deleteAfterLeave?: boolean; 175 176 dm: { 177 message: { 178 content?: string; 179 embed?: GuildEmbed; 180 }; 181 }; 182 183 reactions: { 184 welcomeMessageEmojis: string[]; 185 firstMessageEmojis: string[]; 186 }; 187 188 card: { 189 background?: string; 190 }; 191 192 button: { 193 style: 1 | 2 | 3 | 4; 194 emoji?: string | null; 195 label?: string | null; 196 type: 0; 197 }; 198} 199 200export interface ApiV1GuildsModulesByeGetResponse { 201 channelId: string | null; 202 203 message: { 204 content?: string; 205 embed?: GuildEmbed; 206 }; 207 208 deleteAfter?: number; 209 210 card: { 211 background?: string; 212 }; 213} 214 215export enum StarboardStyle { 216 Username = 0, 217 GlobalName = 1, 218 Nickname = 2, 219 NicknameAndGuildAvatar = 3, 220 Anonymous = 4 221} 222 223export interface ApiV1GuildsModulesStarboardGetResponse { 224 channelId?: string; 225 emoji: string; 226 requiredEmojis: number; 227 embedColor: number; 228 style: StarboardStyle; 229 230 blacklistRoleIds: string[]; 231 blacklistChannelIds: string[]; 232} 233 234export interface ApiV1GuildsModulesLeaderboardUpdatingPostResponse { 235 leaderboardId: string; 236 guildId: string; 237 238 channelId: string; 239 messageId: string; 240 241 type: "messages" | "voiceminutes" | "invites"; 242 243 /** 244 * 0 - text based 245 * 1 - image grid 246 * 2 - image list 247 */ 248 structure: number; 249 styles: { 250 useQuotes: boolean; 251 rank: "**" | "__" | "*" | "`" | null; 252 number: "**" | "__" | "*" | "`" | null; 253 user: "**" | "__" | "*" | "`" | null; 254 }; 255 256 range: "daily" | "weekly" | "monthly" | "alltime"; 257 display: "mention" | "username" | "nickname" | "id"; 258 259 background: string | null; 260 emoji: string | null; 261 262 updatedAt: string; 263 createdAt: string; 264} 265 266export interface ApiV1GuildsModulesLeaderboardGetResponse { 267 bannerUrl: string | null; 268 269 blacklistChannelIds: string[]; 270 271 roles: 272 | { 273 messages: string[]; 274 voiceminutes: string[]; 275 } 276 | undefined; 277 278 updating: ApiV1GuildsModulesLeaderboardUpdatingPostResponse[]; 279} 280 281export interface ApiV1GuildsModulesPassportGetResponse { 282 channelId: string | null; 283 /** 284 * 0 - Ban 285 * 1 - Kick 286 * 2 - Assign role 287 */ 288 punishment: 0 | 1 | 2; 289 punishmentRoleId: string | null; 290 291 successRoleId: string | null; 292 unverifiedRoleId: string | null; 293} 294 295export enum UserFlags { 296 Premium = 1 << 0, 297 ChatToSpeechIgnore = 1 << 4, 298 LeaderboardAlternateStyle = 1 << 5 299} 300 301export interface ApiV1UsersMeGetResponse { 302 flags: UserFlags; 303 voteCount?: number; 304 rank?: { 305 background?: string | null; 306 emoji?: string | null; 307 textColor?: number; 308 barColor?: number; 309 subText?: { 310 type: 0 | 1 | 2 | 3; // 0: off, 1: date, 2: relative, 3: custom 311 content?: string; 312 }; 313 }; 314 voice?: keyof typeof actor; 315 activity?: { 316 messages: number; 317 voiceminutes: number; 318 invites: number; 319 formattedVoicetime: string; 320 }; 321} 322 323export enum ConnectionType { 324 Spotify = 0, 325 Bluesky = 1 326} 327 328export interface ApiV1UsersMeConnectionsGetResponse { 329 username: string; 330 avatar: string | null; 331 type: ConnectionType; 332} 333 334interface PaymentMethodCard { 335 brand: string | null; 336 last4: string | null; 337} 338 339interface PaymentMethodPaypal { 340 brand: "paypal"; 341 email: string | null; 342} 343 344type PaymentMethod = PaymentMethodCard | PaymentMethodPaypal; 345 346export interface ApiV1UsersMeBillingGetResponse { 347 subscriptionId: string; 348 status: 349 | "active" 350 | "canceled" 351 | "incomplete" 352 | "incomplete_expired" 353 | "past_due" 354 | "paused" 355 | "trialing" 356 | "unpaid"; 357 priceId: string; 358 created: number; 359 currentPeriodEnd: number; 360 currentPeriodStart: number; 361 cancelAtPeriodEnd: boolean; 362 donationQuantity: number; 363 paymentMethod: PaymentMethod | null; 364 portalUrl: string | null; 365 guildIds: string[]; 366} 367 368export interface ApiV1GuildsModulesTagsGetResponse { 369 id: string; 370 guildId: string; 371 applicationCommandId?: string; 372 373 name: string; 374 permission: string | null; 375 aliases: string[]; 376 377 message: { 378 content: string | null; 379 embed?: GuildEmbed; 380 }; 381 382 authorId: string; 383 384 createdAt: Date; 385} 386 387export enum AutomodType { 388 BlockServerInvites = "server_invites", 389 BlockBotInvites = "bot_invites", 390 BlockTwitter = "twitter" 391} 392 393export interface ApiV1GuildsModulesAutomodGetResponse { 394 status: Record<AutomodType, boolean>; 395 whitelistChannelIds: string[]; 396 whitelistRoleIds: string[]; 397 keywordFilter: string[]; 398} 399 400export interface ApiV1UsersGetResponse { 401 id: string; 402 username: string; 403 globalName: string | null; 404 avatar: string | null; 405 406 bannerUrl: string | null; 407 voteCount: number; 408 likeCount: number; 409 410 activity: Required<ApiV1UsersMeGetResponse>["activity"]; 411 guilds: { 412 guildId: string; 413 activity: Required<ApiV1UsersMeGetResponse>["activity"]; 414 }[]; 415} 416 417export enum NotificationType { 418 YouTube = 0, 419 Twitch = 1, 420 Bluesky = 2, 421 Reddit = 3 422} 423 424export enum NotificationFlags { 425 DeleteAfterStream = 1 << 4, 426 MustNotMatchRegex = 1 << 8 427} 428 429export enum BlueskyNotificationFlags { 430 SendReposts = 1 << 0, 431 SendReplies = 1 << 1, 432 SendQuotes = 1 << 2, 433 MustContainImage = 1 << 3 434} 435 436export enum YoutubeNotificationFlags { 437 SendVideos = 1 << 5, 438 SendShorts = 1 << 6 439} 440 441export interface ApiV1GuildsModulesNotificationsGetResponse { 442 id: string; 443 guildId: string; 444 channelId: string; 445 roleId: string | null; 446 447 type: NotificationType; 448 flags: BlueskyNotificationFlags | YoutubeNotificationFlags; 449 regex: string | null; 450 451 creatorId: string; 452 453 message: { 454 content: string | null; 455 embed?: GuildEmbed; 456 }; 457 458 createdAt: Date; 459 460 creator: { 461 id: string; 462 username: string; 463 customUrl: string; 464 avatarUrl: string | null; 465 }; 466 467 username: string | null; 468 avatar: string | null; 469} 470 471export interface ApiV1GuildsModulesNotificationStylePatchResponse { 472 username: string; 473 avatar: string | null; 474} 475 476export enum DailypostType { 477 Anime = 1, 478 Blahaj = 2, 479 NekosBest = 3 480} 481 482export interface ApiV1GuildsModulesDailypostsGetResponse { 483 id: string; 484 guildId: string; 485 channelId: string; 486 roleId: string | null; 487 488 runtimeHours: `${number}`[]; 489 490 type: DailypostType; 491 query: string | null; 492} 493 494export interface ApiV1UsersMeRankEmojiPutResponse { 495 id: string; 496 url: string; 497} 498 499export interface ApiV1UsersMeRankEmojiDeleteResponse { 500 id: null; 501 url: null; 502} 503 504export interface PronounsResponse { 505 status: number; 506 content: string[]; 507} 508 509export interface NekosticResponse { 510 event: string; 511 name: string; 512 uses: number; 513 users: number; 514 snapshot: string; 515}