mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-10 15:13:02 -04:00
fix(voiceChannelLog): make modes actually work
This commit is contained in:
parent
0ba03c263d
commit
b9c32cdd91
1 changed files with 7 additions and 4 deletions
|
@ -66,7 +66,6 @@ function getMessageFlags(selfInChannel: boolean) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function sendVoiceStatusMessage(channelId: string, content: string, userId: string, selfInChannel: boolean): Message | null {
|
function sendVoiceStatusMessage(channelId: string, content: string, userId: string, selfInChannel: boolean): Message | null {
|
||||||
if (settings.store.mode === 1) return null;
|
|
||||||
if (!channelId) return null;
|
if (!channelId) return null;
|
||||||
|
|
||||||
const message: Message = createBotMessage({ channelId, content, embeds: [] });
|
const message: Message = createBotMessage({ channelId, content, embeds: [] });
|
||||||
|
@ -109,7 +108,7 @@ let clientOldChannelId: string | undefined;
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
name: "VoiceChannelLog",
|
name: "VoiceChannelLog",
|
||||||
description: "Logs who joins and leaves voice channels",
|
description: "Logs who joins and leaves voice channels",
|
||||||
authors: [Devs.Sqaaakoi, EquicordDevs.thororen],
|
authors: [Devs.Sqaaakoi, EquicordDevs.thororen, EquicordDevs.nyx],
|
||||||
contextMenus: {
|
contextMenus: {
|
||||||
"channel-context": patchChannelContextMenu
|
"channel-context": patchChannelContextMenu
|
||||||
},
|
},
|
||||||
|
@ -139,10 +138,14 @@ export default definePlugin({
|
||||||
timestamp: new Date()
|
timestamp: new Date()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
if (settings.store.mode !== 2) {
|
||||||
addLogEntry(logEntry, oldChannelId);
|
addLogEntry(logEntry, oldChannelId);
|
||||||
addLogEntry(logEntry, channelId);
|
addLogEntry(logEntry, channelId);
|
||||||
|
}
|
||||||
|
|
||||||
if (!settings.store.voiceChannelChatSelf && userId === clientUserId) return;
|
if (!settings.store.voiceChannelChatSelf && userId === clientUserId) return;
|
||||||
|
if (settings.store.mode === 1) return;
|
||||||
// Join / Leave
|
// Join / Leave
|
||||||
if ((!oldChannelId && channelId) || (oldChannelId && !channelId)) {
|
if ((!oldChannelId && channelId) || (oldChannelId && !channelId)) {
|
||||||
// empty string is to make type checker shut up
|
// empty string is to make type checker shut up
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue