Merge remote-tracking branch 'upstream/dev' into immediate-finds

This commit is contained in:
Nuckyz 2024-05-03 20:18:05 -03:00
commit d42c9547ab
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9
2 changed files with 34 additions and 2 deletions

View file

@ -31,6 +31,16 @@ const settings = definePluginSettings({
type: OptionType.BOOLEAN, type: OptionType.BOOLEAN,
default: true default: true
}, },
messages: {
description: "Server Notification Settings",
type: OptionType.SELECT,
options: [
{ label: "All messages", value: 0 },
{ label: "Only @mentions", value: 1 },
{ label: "Nothing", value: 2 },
{ label: "Server default", value: 3, default: true }
],
},
everyone: { everyone: {
description: "Suppress @everyone and @here", description: "Suppress @everyone and @here",
type: OptionType.BOOLEAN, type: OptionType.BOOLEAN,
@ -41,6 +51,16 @@ const settings = definePluginSettings({
type: OptionType.BOOLEAN, type: OptionType.BOOLEAN,
default: true default: true
}, },
highlights: {
description: "Suppress Highlights automatically",
type: OptionType.BOOLEAN,
default: true
},
events: {
description: "Mute New Events automatically",
type: OptionType.BOOLEAN,
default: true
},
showAllChannels: { showAllChannels: {
description: "Show all channels automatically", description: "Show all channels automatically",
type: OptionType.BOOLEAN, type: OptionType.BOOLEAN,
@ -53,7 +73,7 @@ export default definePlugin({
name: "NewGuildSettings", name: "NewGuildSettings",
description: "Automatically mute new servers and change various other settings upon joining", description: "Automatically mute new servers and change various other settings upon joining",
tags: ["MuteNewGuild", "mute", "server"], tags: ["MuteNewGuild", "mute", "server"],
authors: [Devs.Glitch, Devs.Nuckyz, Devs.carince, Devs.Mopi], authors: [Devs.Glitch, Devs.Nuckyz, Devs.carince, Devs.Mopi, Devs.GabiRP],
patches: [ patches: [
{ {
find: ",acceptInvite(", find: ",acceptInvite(",
@ -78,8 +98,16 @@ export default definePlugin({
{ {
muted: settings.store.guild, muted: settings.store.guild,
suppress_everyone: settings.store.everyone, suppress_everyone: settings.store.everyone,
suppress_roles: settings.store.role suppress_roles: settings.store.role,
mute_scheduled_events: settings.store.events,
notify_highlights: settings.store.highlights ? 1 : 0
}); });
if (settings.store.messages !== 3) {
updateGuildNotificationSettings(guildId,
{
message_notifications: settings.store.messages,
});
}
if (settings.store.showAllChannels && isOptInEnabledForGuild(guildId)) { if (settings.store.showAllChannels && isOptInEnabledForGuild(guildId)) {
toggleShowAllChannels(guildId); toggleShowAllChannels(guildId);
} }

View file

@ -449,6 +449,10 @@ export const Devs = /* #__PURE__*/ Object.freeze({
PolisanTheEasyNick: { PolisanTheEasyNick: {
name: "Oleh Polisan", name: "Oleh Polisan",
id: 242305263313485825n id: 242305263313485825n
},
GabiRP: {
name: "GabiRP",
id: 507955112027750401n
} }
} satisfies Record<string, Dev>); } satisfies Record<string, Dev>);