You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/kotlin/me/ddivad/judgebot/embeds/InfractionEmbeds.kt
+21-13Lines changed: 21 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ fun EmbedBuilder.createWarnEmbed(guild: Guild, configuration: GuildConfiguration
23
23
field {
24
24
name ="__Reason__"
25
25
value = infraction.reason
26
-
inline =true
26
+
inline =false
27
27
}
28
28
29
29
if (infraction.ruleNumber !=null) {
@@ -33,16 +33,22 @@ fun EmbedBuilder.createWarnEmbed(guild: Guild, configuration: GuildConfiguration
33
33
}
34
34
}
35
35
36
-
if (configuration.infractionConfiguration.warnPoints >0) {
37
-
field {
38
-
name ="__Points__"
39
-
value ="${infraction.points}"
40
-
inline =true
41
-
}
36
+
field {
37
+
name ="__Warn Points__"
38
+
value ="${infraction.points}"
39
+
inline =true
40
+
}
41
+
42
+
field {
43
+
name ="__Points Count__"
44
+
value ="${guildMember.getPoints(guild)} / ${configuration.infractionConfiguration.pointCeiling}"
45
+
inline =true
46
+
}
42
47
48
+
if (infraction.punishment?.punishment !=PunishmentType.NONE) {
43
49
field {
44
-
name ="__Points Count__"
45
-
value ="${guildMember.getPoints(guild)}/ ${configuration.infractionConfiguration.pointCeiling}"
50
+
name ="__Punishment__"
51
+
value ="${infraction.punishment?.punishment.toString()}${if (infraction.punishment?.duration !=null) "for "+ timeToString(infraction.punishment?.duration!!) else"indefinitely"}"
46
52
inline =true
47
53
}
48
54
}
@@ -88,10 +94,12 @@ fun EmbedBuilder.createStrikeEmbed(guild: Guild, configuration: GuildConfigurati
88
94
inline =true
89
95
}
90
96
91
-
field {
92
-
name ="__Punishment__"
93
-
value ="${infraction.punishment?.punishment.toString()}${if (infraction.punishment?.duration !=null) "for "+ timeToString(infraction.punishment?.duration!!) else"indefinitely"}"
94
-
inline =true
97
+
if (infraction.punishment?.punishment !=PunishmentType.NONE) {
98
+
field {
99
+
name ="__Punishment__"
100
+
value ="${infraction.punishment?.punishment.toString()}${if (infraction.punishment?.duration !=null) "for "+ timeToString(infraction.punishment?.duration!!) else"indefinitely"}"
101
+
inline =true
102
+
}
95
103
}
96
104
97
105
addField("", " A strike is a formal warning for breaking the rules.\nIf you think this to be unjustified, please **do not** post about it in a public channel but take it up with **Modmail**.")
0 commit comments