-
-
Notifications
You must be signed in to change notification settings - Fork 407
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
719 additions
and
463 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
export interface User { | ||
avatar: string; | ||
avatarDecorationData: null | { | ||
asset: string; | ||
skuId: string; | ||
}; | ||
banner: string | null; | ||
bot: boolean; | ||
clan: string | null; | ||
desktop: boolean; | ||
discriminator: string; | ||
displayName: string; | ||
email: string | null; | ||
flags: number; | ||
globalName: string; | ||
guildMemberAvatars: object; | ||
hasAnyStaffLevel(): boolean; | ||
hasBouncedEmail: boolean; | ||
hasFlag(f: number): boolean; | ||
id: string; | ||
isStaff(): boolean; | ||
isStaffPersonal(): boolean; | ||
mfaEnabled: boolean; | ||
mobile: boolean; | ||
nsfwAllowed: boolean | undefined; | ||
personalConnectionId: null | string; | ||
phone: string | null; | ||
premiumType: number | undefined; | ||
premiumUsageFlags: number; | ||
primaryGuild: string | null; | ||
publicFlags: number; | ||
purchasedFlags: number; | ||
system: boolean; | ||
username: string; | ||
verified: boolean; | ||
|
||
readonly avatarDecoration: null | { | ||
asset: string; | ||
skuId: string; | ||
}; | ||
readonly createdAt: Date; | ||
readonly isProvisional: boolean; | ||
readonly tag: string; | ||
} | ||
|
||
export interface DMUser { | ||
avatar: string; | ||
avatar_decoration_data: { | ||
asset: string; | ||
expires_at: string | null; | ||
sku_id: string; | ||
}; | ||
bot: boolean; | ||
clan: string | null; | ||
discriminator: string; | ||
display_name: string; | ||
global_name: string; | ||
id: string; | ||
primary_guild: string | null; | ||
public_flags: number; | ||
username: string; | ||
} | ||
|
||
export interface PermissionOverwrite { | ||
allow: bigint; | ||
deny: bigint; | ||
id: string; | ||
type: number; | ||
} | ||
|
||
export interface Channel { | ||
application_id: string | undefined; | ||
flags_: number; | ||
guild_id: string | null; | ||
icon: string | undefined; | ||
id: string; | ||
isMessageRequest: boolean; | ||
isMessageRequestTimestamp: boolean | null; | ||
isSpam: boolean; | ||
lastMessageId: string; | ||
lastPinTimestamp: string; | ||
name: string; | ||
nicks: { | ||
[key: string]: string; | ||
} | ||
ownerId: string; | ||
rawRecipients: User[]; | ||
recipientFlags: number; | ||
recipients: string[]; | ||
safetyWarnings: string[]; | ||
type: number; | ||
|
||
readonly accessPermissions: bigint; | ||
readonly bitrate: number; | ||
readonly flags: number; | ||
readonly isHDStreamSplashed: boolean; | ||
readonly nsfw: boolean; | ||
readonly permissionOverwrites: { | ||
[id: string]: PermissionOverwrite; | ||
}; | ||
readonly position: number; | ||
readonly rateLimitPerUser: number; | ||
readonly topic: string; | ||
readonly userLimit: number; | ||
} | ||
|
||
export interface DMChannel extends Channel { | ||
type: 1; | ||
} | ||
|
||
export interface GuildChannel extends Channel { | ||
defaultAutoArchiveDuration: number | undefined; | ||
defaultThreadRateLimitPerUser: number | undefined; | ||
hdStreamingBuyerId: string | undefined; | ||
hdStreamingUntil: Date | undefined; | ||
iconEmoji: undefined; | ||
linkedLobby: undefined; | ||
memberListId: undefined; | ||
parent_id: string; | ||
permissionOverwrites_: { | ||
[id: string]: PermissionOverwrite; | ||
}; | ||
position_: number; | ||
rateLimitPerUser_: number; | ||
themeColor: string | undefined; | ||
topic_: string; | ||
type: 0; | ||
version: number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
export type ClassModule = Record<string, string>; | ||
|
||
|
||
export interface Dispatcher { | ||
register<T>(callback: (payload: T) => void): string; | ||
unregister(id: string): void; | ||
waitFor(IDs: string[]): void; | ||
dispatch<T>(payload: T): void; | ||
isDispatching(): boolean; | ||
} | ||
|
||
export type StoreChangeListener = () => void; | ||
|
||
export interface FluxStore { | ||
addChangeListener(fn: StoreChangeListener): void; | ||
removeChangeListener(fn: StoreChangeListener): void; | ||
|
||
emitChange(): void; | ||
getDispatchToken(): string; | ||
getName(): string; | ||
initialize(): void; | ||
_dispatchToken: string; | ||
_isInitialized: boolean; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
import {Manifest} from "../BetterDiscord/manifest"; | ||
|
||
const manifest: Manifest = { | ||
info: { | ||
name: "BlurNSFW", | ||
authors: [{ | ||
name: "Zerebos", | ||
discord_id: "249746236008169473", | ||
github_username: "zerebos", | ||
twitter_username: "IAmZerebos" | ||
}], | ||
version: "1.0.4", | ||
description: "Blurs images and videos until you hover over them.", | ||
github: "https://github.com/zerebos/BetterDiscordAddons/tree/master/Plugins/BlurNSFW", | ||
github_raw: "https://raw.githubusercontent.com/zerebos/BetterDiscordAddons/master/Plugins/BlurNSFW/BlurNSFW.plugin.js" | ||
}, | ||
changelog: [ | ||
{ | ||
title: "What's New?", | ||
type: "added", | ||
items: [ | ||
"Plugin no longer relies on ZeresPluginLibrary!", | ||
] | ||
}, | ||
{ | ||
title: "Bug Fixes & Info", | ||
type: "fixed", | ||
items: [ | ||
"Media should be blurred properly once again!", | ||
"If things aren't blurred properly for you, it might be due to an experiment Discord is doing.", | ||
"Once the experiment is more widely rolled out, I will add compatibility for it in this plugin." | ||
] | ||
} | ||
], | ||
config: [ | ||
{ | ||
type: "switch", | ||
id: "blurNSFW", | ||
name: "Blur NSFW Channels", | ||
note: "This setting automatically blurs media in channels marked NSFW.", | ||
value: true | ||
}, | ||
{ | ||
type: "slider", | ||
id: "blurSize", | ||
name: "Blur Size", | ||
note: "The size (in px) of the blurred pixels.", | ||
value: 10, | ||
min: 0, | ||
max: 50, | ||
units: "px" | ||
}, | ||
{ | ||
type: "slider", | ||
id: "blurTime", | ||
name: "Blur Time", | ||
note: "The time (in ms) it takes for the blur to disappear and reappear.", | ||
value: 200, | ||
min: 0, | ||
max: 5000, | ||
units: "ms" | ||
}, | ||
{ | ||
type: "switch", | ||
id: "blurOnFocus", | ||
name: "Blur When Focused", | ||
note: "This setting keeps the blur when clicking on/expanding an image.", | ||
value: true | ||
} | ||
], | ||
main: "index.ts" | ||
}; | ||
|
||
export default manifest; |
Oops, something went wrong.