Merge branch 'main' into emoteCloner

This commit is contained in:
sadan4 2024-07-20 18:20:05 -04:00 committed by GitHub
commit efc38a1d2e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 21 additions and 17 deletions

View file

@ -21,6 +21,7 @@
"buildReporter": "pnpm buildWebStandalone --reporter --skip-extension",
"buildReporterDesktop": "pnpm build --reporter",
"watch": "pnpm build --watch",
"dev": "pnpm watch",
"watchWeb": "pnpm buildWeb --watch",
"generatePluginJson": "tsx scripts/generatePluginList.ts",
"generateTypes": "tspc --emitDeclarationOnly --declaration --outDir packages/vencord-types",

View file

@ -91,7 +91,7 @@ export default definePlugin({
/* new profiles */
{
find: ".PANEL]:14",
find: ".FULL_SIZE]:26",
replacement: {
match: /(?<=(\i)=\(0,\i\.\i\)\(\i\);)return 0===\i.length\?/,
replace: "$1.unshift(...$self.getBadges(arguments[0].displayProfile));$&"

View file

@ -1,6 +1,6 @@
.vc-mentionAvatars-avatar {
vertical-align: middle;
width: 1em;
width: 1em !important; /* insane discord sets width: 100% in channel topic */
height: 1em;
margin: 0 4px 0.2rem 2px;
border-radius: 50%;

View file

@ -147,6 +147,7 @@ async function fetchMessage(channelID: string, messageID: string) {
if (!msg) return;
const message: Message = MessageStore.getMessages(msg.channel_id).receiveMessage(msg).get(msg.id);
if (!message) return;
messageCache.set(message.id, {
message,

View file

@ -43,14 +43,23 @@ function fetchReactions(msg: Message, emoji: ReactionEmoji, type: number) {
},
oldFormErrors: true
})
.then(res => FluxDispatcher.dispatch({
type: "MESSAGE_REACTION_ADD_USERS",
channelId: msg.channel_id,
messageId: msg.id,
users: res.body,
emoji,
reactionType: type
}))
.then(res => {
for (const user of res.body) {
FluxDispatcher.dispatch({
type: "USER_UPDATE",
user
});
}
FluxDispatcher.dispatch({
type: "MESSAGE_REACTION_ADD_USERS",
channelId: msg.channel_id,
messageId: msg.id,
users: res.body,
emoji,
reactionType: type
});
})
.catch(console.error)
.finally(() => sleep(250));
}
@ -148,13 +157,6 @@ export default definePlugin({
const reactions = getReactionsWithQueue(message, emoji, type);
const users = Object.values(reactions).filter(Boolean) as User[];
for (const user of users) {
FluxDispatcher.dispatch({
type: "USER_UPDATE",
user
});
}
return (
<div
style={{ marginLeft: "0.5em", transform: "scale(0.9)" }}