NewGuildSettings: add push notifs, highlights & events (#2413)
Co-authored-by: V <vendicated@riseup.net>
This commit is contained in:
parent
a6c09bc909
commit
04d7cb8797
2 changed files with 35 additions and 3 deletions
|
@ -31,6 +31,16 @@ const settings = definePluginSettings({
|
|||
type: OptionType.BOOLEAN,
|
||||
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: {
|
||||
description: "Suppress @everyone and @here",
|
||||
type: OptionType.BOOLEAN,
|
||||
|
@ -41,6 +51,16 @@ const settings = definePluginSettings({
|
|||
type: OptionType.BOOLEAN,
|
||||
default: true
|
||||
},
|
||||
highlights: {
|
||||
description: "Suppress Highlights automatically",
|
||||
type: OptionType.BOOLEAN,
|
||||
default: true
|
||||
},
|
||||
events: {
|
||||
description: "Mute New Events automatically",
|
||||
type: OptionType.BOOLEAN,
|
||||
default: true
|
||||
},
|
||||
showAllChannels: {
|
||||
description: "Show all channels automatically",
|
||||
type: OptionType.BOOLEAN,
|
||||
|
@ -53,7 +73,7 @@ export default definePlugin({
|
|||
name: "NewGuildSettings",
|
||||
description: "Automatically mute new servers and change various other settings upon joining",
|
||||
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: [
|
||||
{
|
||||
find: ",acceptInvite(",
|
||||
|
@ -78,8 +98,16 @@ export default definePlugin({
|
|||
{
|
||||
muted: settings.store.guild,
|
||||
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)) {
|
||||
toggleShowAllChannels(guildId);
|
||||
}
|
||||
|
|
|
@ -449,6 +449,10 @@ export const Devs = /* #__PURE__*/ Object.freeze({
|
|||
PolisanTheEasyNick: {
|
||||
name: "Oleh Polisan",
|
||||
id: 242305263313485825n
|
||||
},
|
||||
GabiRP: {
|
||||
name: "GabiRP",
|
||||
id: 507955112027750401n
|
||||
}
|
||||
} satisfies Record<string, Dev>);
|
||||
|
||||
|
|
Loading…
Reference in a new issue