-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(plugin) allCallTimers: adds timers to all users in guild voice calls #2132
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you could use IPC events instead of the interval to handle users joining/switching channels.
As per looks I think it looks kinda bad as the red color doesn't fit very well and it overlaps other things
Also your plugin is missing a README.md
The data is lost on restart because the plugin is restarted btw :)
How it is at the moment works; given it's never necessary to update this more than once a second. I agree it could definitely be run less often to fit more with the theme of Vencord. Where could I find some example how to do/use this? I have 0 experience with IPC events, especially within discord.
I also agree. It's less than ideal to move elements around; there is very limited space. When it is inline, a long username will cause ellipsed usernames. Under the username makes it too confusing about who the timer belongs to. There is not enough space to the left of the user image. Where it is now is conditionally free when there are no rendered icons. The icons can still be seen. As for the red, again I agree but if the element doesn't fit cleanly why not go all out? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some more suggestions:
For the looks maybe use a clock icon and then put the time in the tooltip if it's okay to be only visible on hover
For the IPC implementation just look into other plugins. For example
Vencord/src/plugins/vcNarrator/index.tsx
Lines 160 to 188 in 620c127
VOICE_STATE_UPDATES({ voiceStates }: { voiceStates: VoiceState[]; }) { | |
const myGuildId = SelectedGuildStore.getGuildId(); | |
const myChanId = SelectedChannelStore.getVoiceChannelId(); | |
const myId = UserStore.getCurrentUser().id; | |
if (ChannelStore.getChannel(myChanId!)?.type === 13 /* Stage Channel */) return; | |
for (const state of voiceStates) { | |
const { userId, channelId, oldChannelId } = state; | |
const isMe = userId === myId; | |
if (!isMe) { | |
if (!myChanId) continue; | |
if (channelId !== myChanId && oldChannelId !== myChanId) continue; | |
} | |
const [type, id] = getTypeAndChannelId(state, isMe); | |
if (!type) continue; | |
const template = Settings.plugins.VcNarrator[type + "Message"]; | |
const user = isMe && !Settings.plugins.VcNarrator.sayOwnName ? "" : UserStore.getUser(userId).username; | |
const displayName = user && ((UserStore.getUser(userId) as any).globalName ?? user); | |
const nickname = user && (GuildMemberStore.getNick(myGuildId, userId) ?? user); | |
const channel = ChannelStore.getChannel(id).name; | |
speak(formatText(template, user, channel, displayName, nickname)); | |
// updateStatuses(type, state, isMe); | |
} | |
}, |
The Plugin name doesn't need to be camelCase (also see other plugins for reference)
I think the default UI/UX is fine now but you should probably make the other view look good too. Maybe make it smaller or somehow integrate it without overlapping and better text color. Are you working on the IPC implementation? Or should I do it? |
I was planning to have a look tomorrow but I would love to see what you can do! |
Done: Max-Herbold#1 |
component gets remounted so the timer needs to use a fixed start time
This is ready to be merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
meow
Hi, @6faw it looks as though you have copied across the folder You may check here (Max-Herbold/AllCallTimersDiscordPlugin#22) for a temporary solution but this method is probably more effort to maintain for users than it is worth. |
@Vendicated still awaiting some review. |
Builds on the idea of the callTimer plugin but adds timers to all users in guild voice calls.
VIEW
Settings
This does not modify any network behavior of Discord it simply grabs updates as they are naturally informed to the client. There is a toggle,
Watch Large Guilds
to subscribe to all guilds (large guilds are not subscribed automatically), when this is disabled large guilds are usually updated roughly every 7-15 minutes (through passive updates). Since a user naturally subscribes to a guild when they interact with it, if the toggleWatch Large Guilds
is enabled, on client load, it acts as if all guilds have been interacted with by a user.Please let me know if you have any questions or suggestions for improvement.
fixes Max-Herbold/AllCallTimersDiscordPlugin#22