mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-20 03:47:01 -04:00
Merge remote-tracking branch 'upstream/dev' into dev
This commit is contained in:
commit
252c4929cc
8 changed files with 23 additions and 15 deletions
|
@ -73,8 +73,8 @@ export default definePlugin({
|
|||
group: true,
|
||||
replacement: [
|
||||
{
|
||||
match: /(?<=\.AVATAR_SIZE\).{0,100};)(?=return)/,
|
||||
replace: "$self.useAccountPanelRef();"
|
||||
match: /let{speaking:\i/,
|
||||
replace: "$self.useAccountPanelRef();$&"
|
||||
},
|
||||
{
|
||||
match: /(\.AVATAR,children:.+?renderPopout:(\i)=>){(.+?)}(?=,position)(?<=currentUser:(\i).+?)/,
|
||||
|
|
|
@ -44,15 +44,15 @@ export default definePlugin({
|
|||
find: "#{intl::GUILD_OWNER}),children:",
|
||||
replacement: {
|
||||
match: /(\.CUSTOM_STATUS.+?animate:)\i/,
|
||||
replace: (_, rest) => `${rest}!0`
|
||||
replace: "$1!0"
|
||||
}
|
||||
},
|
||||
{
|
||||
// Guild Banner
|
||||
find: ".animatedBannerHoverLayer,onMouseEnter:",
|
||||
replacement: {
|
||||
match: /(?<=guildBanner:\i,animate:)\i(?=,isRefreshEnabled:)/,
|
||||
replace: "!0"
|
||||
match: /(\.headerContent.+?guildBanner:\i,animate:)\i/,
|
||||
replace: "$1!0"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -99,7 +99,7 @@ export default definePlugin({
|
|||
},
|
||||
// Current user area, at bottom of channels/dm list
|
||||
{
|
||||
find: "renderAvatarWithPopout(){",
|
||||
find: "#{intl::ACCOUNT_SPEAKING_WHILE_MUTED}",
|
||||
replacement: [
|
||||
// Use Decor avatar decoration hook
|
||||
{
|
||||
|
|
|
@ -149,6 +149,12 @@ export default definePlugin({
|
|||
|
||||
renderChatBarButton: ChatBarIcon,
|
||||
|
||||
colorCodeFromNumber(color: number): string {
|
||||
return `#${[color >> 16, color >> 8, color]
|
||||
.map(x => (x & 0xFF).toString(16))
|
||||
.join("")}`;
|
||||
},
|
||||
|
||||
// Gets the Embed of a Link
|
||||
async getEmbed(url: URL): Promise<Object | {}> {
|
||||
const { body } = await RestAPI.post({
|
||||
|
@ -157,6 +163,8 @@ export default definePlugin({
|
|||
urls: [url]
|
||||
}
|
||||
});
|
||||
// The endpoint returns the color as a number, but Discord expects a string
|
||||
body.embeds[0].color = this.colorCodeFromNumber(body.embeds[0].color);
|
||||
return await body.embeds[0];
|
||||
},
|
||||
|
||||
|
@ -166,7 +174,7 @@ export default definePlugin({
|
|||
message.embeds.push({
|
||||
type: "rich",
|
||||
rawTitle: "Decrypted Message",
|
||||
color: "0x45f5f5",
|
||||
color: "#45f5f5",
|
||||
rawDescription: revealed,
|
||||
footer: {
|
||||
text: "Made with ❤️ by c0dine and Sammy!",
|
||||
|
|
|
@ -85,8 +85,7 @@ export default definePlugin({
|
|||
const colorString = context?.author?.colorString;
|
||||
const color = calculateNameColorForUser(userId);
|
||||
|
||||
// color preview in role settings
|
||||
// channel.id is undefined in the role menu
|
||||
// Color preview in role settings
|
||||
if (context?.message?.channel_id === "1337" && userId === "313337")
|
||||
return colorString;
|
||||
|
||||
|
|
|
@ -63,10 +63,10 @@ export default definePlugin({
|
|||
|
||||
patches: [
|
||||
{
|
||||
find: "#{intl::BLOCKED_MESSAGE_COUNT}}",
|
||||
find: ".__invalid_blocked,",
|
||||
replacement: [
|
||||
{
|
||||
match: /let\{[^}]*collapsedReason[^}]*\}/,
|
||||
match: /let{expanded:\i,[^}]*?collapsedReason[^}]*}/,
|
||||
replace: "if($self.shouldHide(arguments[0]))return null;$&"
|
||||
}
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue