Skip to content

Commit 155cefc

Browse files
committed
cleanup, fix missing migration, remove message handler fixes #164, remove unused settings
1 parent 2882ea6 commit 155cefc

File tree

5 files changed

+322
-92
lines changed

5 files changed

+322
-92
lines changed

Asterion/Asterion.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ public async Task MainAsync()
5151
// Setup interaction command handler
5252
await services.GetRequiredService<InteractionCommandHandler>().InitializeAsync();
5353

54-
await services.GetRequiredService<MessageHandler>().InitializeAsync();
55-
5654
// Initialize data service after client has been connected
5755
client.Ready += services.GetRequiredService<IDataService>().InitializeAsync;
5856
services.GetRequiredService<ClientService>().Initialize();
@@ -140,7 +138,6 @@ private ServiceProvider ConfigureServices()
140138
.AddSingleton(new CommandService(commandConfig))
141139
.AddSingleton<InteractionService>( new InteractionService(client))
142140
.AddSingleton<InteractionCommandHandler>()
143-
.AddSingleton<MessageHandler>()
144141
.AddSingleton<LoggingService>()
145142
.AddSingleton<IDataService, DataService>()
146143
.AddSingleton<ModrinthService>()

Asterion/ComponentBuilders/SettingsComponentBuilder.cs

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -62,21 +62,7 @@ public static ComponentBuilder GetMoreSettingsComponents(string userId, GuildSet
6262
new ActionRowBuilder()
6363
.WithButton(new ButtonBuilder
6464
{
65-
Label = "1. [Experimental] Scan messages",
66-
CustomId = $"settings-message-scan:{userId};{guildSettings.CheckMessagesForModrinthLink}",
67-
Emote = Emoji.Parse(":warning:"),
68-
Style = ButtonStyle.Primary
69-
})
70-
.WithButton(new ButtonBuilder
71-
{
72-
Label = "2. Channel selection after subscribe",
73-
CustomId = $"settings-channel-selection:{userId};{guildSettings.ShowChannelSelection}",
74-
Style = ButtonStyle.Primary,
75-
IsDisabled = true
76-
})
77-
.WithButton(new ButtonBuilder
78-
{
79-
Label = "3. Show subscribe button",
65+
Label = "1. Show subscribe button",
8066
CustomId = $"settings-show-subscribe-button:{userId};{guildSettings.ShowSubscribeButton}",
8167
Style = ButtonStyle.Primary
8268
}),

Asterion/EmbedBuilders/SettingsEmbedBuilder.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,7 @@ public static EmbedBuilder GetMoreSettingsEmbedBuilder(Guild guild)
3434
description.AppendLine(Format.Bold(Format.Underline("Overview of settings")));
3535
description.AppendLine();
3636
description.AppendLine(
37-
$"**1. Check messages for Modrinth links:** {GetEmojiByBool((bool) guild.GuildSettings.CheckMessagesForModrinthLink!)}");
38-
description.AppendLine(
39-
$"**2. Show channel selection after subscribe:** {GetEmojiByBool((bool) guild.GuildSettings.ShowChannelSelection!)}");
40-
description.AppendLine(
41-
$"**3. Show subscribe button in Modrinth project embeds:** {GetEmojiByBool((bool) guild.GuildSettings.ShowSubscribeButton!)}");
42-
;
37+
$"**1. Show subscribe button in Modrinth project embeds:** {GetEmojiByBool((bool) guild.GuildSettings.ShowSubscribeButton!)}");
4338

4439
var embed = new EmbedBuilder
4540
{

Asterion/Migrations/20241123122729_addloadertype_entry.Designer.cs

Lines changed: 320 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)