@@ -25,7 +25,7 @@ public HalfMastModule(IDiscordModuleService moduleService, IHalfMastService half
25
25
26
26
if ( halfMastStatus . IsHalfStaff )
27
27
{
28
- var embedTitle = CreateHalfMastInfoEmbedTitle ( halfMastStatus . State ) ;
28
+ var embedTitle = CreateHalfMastInfoEmbedTitle ( halfMastStatus . State , halfMastStatus . IsHalfStaff ) ;
29
29
var embedBuilder = new EmbedBuilder ( )
30
30
. WithTitle ( embedTitle )
31
31
. WithDescription ( halfMastStatus . Description )
@@ -36,26 +36,39 @@ public HalfMastModule(IDiscordModuleService moduleService, IHalfMastService half
36
36
}
37
37
else
38
38
{
39
- if ( string . IsNullOrEmpty ( stateAbbreviation ) )
40
- {
41
- await RespondAsync ( $ "I couldn't find any recent half mast alerts for the entire US.") ;
42
- }
43
- else
44
- {
45
- await RespondAsync ( $ "I couldn't find any recent half mast alerts for { stateAbbreviation . ToUpper ( ) } .") ;
46
- }
39
+ var embedTitle = CreateHalfMastInfoEmbedTitle ( halfMastStatus . State , halfMastStatus . IsHalfStaff ) ;
40
+ var embedBuilder = new EmbedBuilder ( )
41
+ . WithTitle ( embedTitle )
42
+ . WithFooter ( $ "Source: { halfMastStatus . SourceUrl } ",
43
+ $ "https://raw.githubusercontent.com/flyingfisch/FischBotDiscord-csharp/master/assets/us-flag.png") ;
44
+
45
+ await RespondAsync ( embed : embedBuilder . Build ( ) ) ;
47
46
}
48
47
}
49
48
50
- private string CreateHalfMastInfoEmbedTitle ( string state )
49
+ private string CreateHalfMastInfoEmbedTitle ( string state , bool isHalfMast )
51
50
{
52
- if ( string . IsNullOrEmpty ( state ) )
51
+ if ( isHalfMast )
53
52
{
54
- return "The flag is at half mast" ;
53
+ if ( string . IsNullOrEmpty ( state ) )
54
+ {
55
+ return $ "The flag is at half mast";
56
+ }
57
+ else
58
+ {
59
+ return $ "The flag is at half mast in { state } ";
60
+ }
55
61
}
56
62
else
57
63
{
58
- return $ "The flag is at half mast in { state } ";
64
+ if ( string . IsNullOrEmpty ( state ) )
65
+ {
66
+ return $ "The flag is not at half mast";
67
+ }
68
+ else
69
+ {
70
+ return $ "The flag is not at half mast in { state } ";
71
+ }
59
72
}
60
73
}
61
74
}
0 commit comments