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
Changes:
- Updated infraction flow to only send mute embeds if mute isn't part of an infraction.
- Updated infraction embeds to make them clearer, by putting the reason first.
- Updated history embeds to sort infractions by date, instead of infraction id.
fun EmbedBuilder.createWarnEmbed(guild:Guild, configuration:GuildConfiguration, user:User, guildMember:GuildMember, infraction:Infraction, rule:Rule?) {
19
+
fun EmbedBuilder.createWarnEmbed1(guild:Guild, configuration:GuildConfiguration, user:User, guildMember:GuildMember, infraction:Infraction, rule:Rule?) {
20
20
title ="Warn"
21
21
description ="${user.mention}, you have received a **warning** from **${guild.name}**."
22
22
23
23
field {
24
24
name ="__Reason__"
25
25
value = infraction.reason
26
-
inline =false
27
26
}
28
27
29
28
if (infraction.ruleNumber !=null) {
@@ -50,9 +49,9 @@ fun EmbedBuilder.createWarnEmbed(guild: Guild, configuration: GuildConfiguration
50
49
field {
51
50
name =""
52
51
value ="""
53
-
A warning is a way for staff to inform you that your behaviour needs to change or further infractions will follow.
54
-
If you think this to be unjustified, please **do not** post about it in a public channel but DM **Modmail**.
55
-
""".trimIndent()
52
+
| A warning is a way for staff to inform you that your behaviour needs to change or further infractions will follow.
53
+
| If you think this to be unjustified, please **do not** post about it in a public channel but take it up with **Modmail**.
54
+
""".trimMargin()
56
55
}
57
56
58
57
color =Color.RED
@@ -65,12 +64,15 @@ fun EmbedBuilder.createWarnEmbed(guild: Guild, configuration: GuildConfiguration
65
64
}
66
65
}
67
66
68
-
fun EmbedBuilder.createStrikeEmbed(guild:Guild, configuration:GuildConfiguration, user:User, guildMember:GuildMember, infraction:Infraction, rule:Rule?) {
69
-
title ="Strike"
70
-
description ="""
71
-
| ${user.mention}, you have received a **strike** from **${guild.name}**. A strike is a formal warning for breaking the rules.
72
-
| If you think this is unjustified, please **do not** post about it in a public channel but take it up with **Modmail**.
73
-
""".trimMargin()
67
+
fun EmbedBuilder.createWarnEmbed(guild:Guild, configuration:GuildConfiguration, user:User, guildMember:GuildMember, infraction:Infraction, rule:Rule?) {
68
+
title ="Warn"
69
+
description ="${user.mention}, you have received a **warning** from **${guild.name}**."
70
+
71
+
field {
72
+
name ="__Reason__"
73
+
value = infraction.reason
74
+
inline =true
75
+
}
74
76
75
77
if (infraction.ruleNumber !=null) {
76
78
field {
@@ -79,12 +81,49 @@ fun EmbedBuilder.createStrikeEmbed(guild: Guild, configuration: GuildConfigurati
79
81
}
80
82
}
81
83
84
+
if (configuration.infractionConfiguration.warnPoints >0) {
85
+
field {
86
+
name ="__Points__"
87
+
value ="${infraction.points}"
88
+
inline =true
89
+
}
90
+
91
+
field {
92
+
name ="__Points Count__"
93
+
value ="${guildMember.getPoints(guild)} / ${configuration.infractionConfiguration.pointCeiling}"
94
+
inline =true
95
+
}
96
+
}
97
+
98
+
addField("", "A warning is a way for staff to inform you that your behaviour needs to change or further infractions will follow. \nIf you think this to be unjustified, please **do not** post about it in a public channel but take it up with **Modmail**.")
99
+
100
+
color =Color.RED
101
+
thumbnail {
102
+
url = guild.getIconUrl(Image.Format.PNG) ?:""
103
+
}
104
+
footer {
105
+
icon = guild.getIconUrl(Image.Format.PNG) ?:""
106
+
text = guild.name
107
+
}
108
+
}
109
+
110
+
fun EmbedBuilder.createStrikeEmbed(guild:Guild, configuration:GuildConfiguration, user:User, guildMember:GuildMember, infraction:Infraction, rule:Rule?) {
111
+
title ="Strike"
112
+
description ="${user.mention}, you have received a **strike** from **${guild.name}**."
113
+
82
114
field {
83
115
name ="__Reason__"
84
116
value = infraction.reason
85
117
inline =false
86
118
}
87
119
120
+
if (infraction.ruleNumber !=null) {
121
+
field {
122
+
name ="__Rule Broken__"
123
+
value ="**[${rule?.title}](${rule?.link})** \n${rule?.description}"
124
+
}
125
+
}
126
+
88
127
field {
89
128
name ="__Strike Points__"
90
129
value ="${infraction.points}"
@@ -102,6 +141,10 @@ fun EmbedBuilder.createStrikeEmbed(guild: Guild, configuration: GuildConfigurati
102
141
value ="${infraction.punishment?.punishment.toString()}${if (infraction.punishment?.duration !=null) "for "+ timeToString(infraction.punishment?.duration!!) else"indefinitely"}"
103
142
inline =true
104
143
}
144
+
145
+
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