mirror of
https://github.com/TeamOctolings/Octobot.git
synced 2025-04-19 16:33:36 +03:00
Add Messages.TimeSpanExample, edit command descriptions
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
This commit is contained in:
parent
b11fe76b45
commit
015103512d
8 changed files with 23 additions and 2 deletions
|
@ -654,4 +654,7 @@
|
||||||
<data name="EightBallNegative5" xml:space="preserve">
|
<data name="EightBallNegative5" xml:space="preserve">
|
||||||
<value>Very doubtful</value>
|
<value>Very doubtful</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="TimeSpanExample" xml:space="preserve">
|
||||||
|
<value>Example of a valid input: `1h30m`</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
|
|
|
@ -654,4 +654,7 @@
|
||||||
<data name="EightBallNegative5" xml:space="preserve">
|
<data name="EightBallNegative5" xml:space="preserve">
|
||||||
<value>Весьма сомнительно</value>
|
<value>Весьма сомнительно</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="TimeSpanExample" xml:space="preserve">
|
||||||
|
<value>Пример правильного ввода: `1h30m`</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
|
|
|
@ -654,4 +654,7 @@
|
||||||
<data name="EightBallNegative5" xml:space="preserve">
|
<data name="EightBallNegative5" xml:space="preserve">
|
||||||
<value>чот сомневаюсь</value>
|
<value>чот сомневаюсь</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="TimeSpanExample" xml:space="preserve">
|
||||||
|
<value>правильно пишут так: `1h30m`</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
|
|
|
@ -76,7 +76,8 @@ public class BanCommandGroup : CommandGroup
|
||||||
[Description("User to ban")] IUser target,
|
[Description("User to ban")] IUser target,
|
||||||
[Description("Ban reason")] [MaxLength(256)]
|
[Description("Ban reason")] [MaxLength(256)]
|
||||||
string reason,
|
string reason,
|
||||||
[Description("Ban duration")] string? duration = null)
|
[Description("Ban duration (e.g. 1h30m)")]
|
||||||
|
string? duration = null)
|
||||||
{
|
{
|
||||||
if (!_context.TryGetContextIDs(out var guildId, out var channelId, out var executorId))
|
if (!_context.TryGetContextIDs(out var guildId, out var channelId, out var executorId))
|
||||||
{
|
{
|
||||||
|
@ -116,6 +117,7 @@ public class BanCommandGroup : CommandGroup
|
||||||
{
|
{
|
||||||
var failedEmbed = new EmbedBuilder()
|
var failedEmbed = new EmbedBuilder()
|
||||||
.WithSmallTitle(Messages.InvalidTimeSpan, bot)
|
.WithSmallTitle(Messages.InvalidTimeSpan, bot)
|
||||||
|
.WithDescription(Messages.TimeSpanExample)
|
||||||
.WithColour(ColorsList.Red)
|
.WithColour(ColorsList.Red)
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,7 @@ public class MuteCommandGroup : CommandGroup
|
||||||
[Description("Member to mute")] IUser target,
|
[Description("Member to mute")] IUser target,
|
||||||
[Description("Mute reason")] [MaxLength(256)]
|
[Description("Mute reason")] [MaxLength(256)]
|
||||||
string reason,
|
string reason,
|
||||||
[Description("Mute duration")] [Option("duration")]
|
[Description("Mute duration (e.g. 1h30m)")] [Option("duration")]
|
||||||
string stringDuration)
|
string stringDuration)
|
||||||
{
|
{
|
||||||
if (!_context.TryGetContextIDs(out var guildId, out var channelId, out var executorId))
|
if (!_context.TryGetContextIDs(out var guildId, out var channelId, out var executorId))
|
||||||
|
@ -111,6 +111,7 @@ public class MuteCommandGroup : CommandGroup
|
||||||
{
|
{
|
||||||
var failedEmbed = new EmbedBuilder()
|
var failedEmbed = new EmbedBuilder()
|
||||||
.WithSmallTitle(Messages.InvalidTimeSpan, bot)
|
.WithSmallTitle(Messages.InvalidTimeSpan, bot)
|
||||||
|
.WithDescription(Messages.TimeSpanExample)
|
||||||
.WithColour(ColorsList.Red)
|
.WithColour(ColorsList.Red)
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
|
|
|
@ -151,6 +151,7 @@ public class RemindCommandGroup : CommandGroup
|
||||||
{
|
{
|
||||||
var failedEmbed = new EmbedBuilder()
|
var failedEmbed = new EmbedBuilder()
|
||||||
.WithSmallTitle(Messages.InvalidTimeSpan, bot)
|
.WithSmallTitle(Messages.InvalidTimeSpan, bot)
|
||||||
|
.WithDescription(Messages.TimeSpanExample)
|
||||||
.WithColour(ColorsList.Red)
|
.WithColour(ColorsList.Red)
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
|
@ -264,6 +265,7 @@ public class RemindCommandGroup : CommandGroup
|
||||||
{
|
{
|
||||||
var failedEmbed = new EmbedBuilder()
|
var failedEmbed = new EmbedBuilder()
|
||||||
.WithSmallTitle(Messages.InvalidTimeSpan, bot)
|
.WithSmallTitle(Messages.InvalidTimeSpan, bot)
|
||||||
|
.WithDescription(Messages.TimeSpanExample)
|
||||||
.WithColour(ColorsList.Red)
|
.WithColour(ColorsList.Red)
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
|
|
|
@ -461,6 +461,7 @@ public class ToolsCommandGroup : CommandGroup
|
||||||
{
|
{
|
||||||
var failedEmbed = new EmbedBuilder()
|
var failedEmbed = new EmbedBuilder()
|
||||||
.WithSmallTitle(Messages.InvalidTimeSpan, bot)
|
.WithSmallTitle(Messages.InvalidTimeSpan, bot)
|
||||||
|
.WithDescription(Messages.TimeSpanExample)
|
||||||
.WithColour(ColorsList.Red)
|
.WithColour(ColorsList.Red)
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
|
|
6
src/Messages.Designer.cs
generated
6
src/Messages.Designer.cs
generated
|
@ -1178,5 +1178,11 @@ namespace Octobot {
|
||||||
return ResourceManager.GetString("EightBallNegative5", resourceCulture);
|
return ResourceManager.GetString("EightBallNegative5", resourceCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal static string TimeSpanExample {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("TimeSpanExample", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue