timezone parsing done, just needs actual db field and usage
This commit is contained in:
parent
12eb216a4b
commit
c32546d633
@ -552,5 +552,45 @@ namespace NadekoBot.Modules.Administration
|
|||||||
|
|
||||||
await Context.Channel.SendConfirmAsync($"Successfuly added a new donator. Total donated amount from this user: {don.Amount} 👑").ConfigureAwait(false);
|
await Context.Channel.SendConfirmAsync($"Successfuly added a new donator. Total donated amount from this user: {don.Amount} 👑").ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//[NadekoCommand, Usage, Description, Aliases]
|
||||||
|
//[RequireContext(ContextType.Guild)]
|
||||||
|
//public async Task Timezones(int page = 1)
|
||||||
|
//{
|
||||||
|
// page -= 1;
|
||||||
|
|
||||||
|
// if (page < 0 || page > 20)
|
||||||
|
// return;
|
||||||
|
|
||||||
|
// var timezones = TimeZoneInfo.GetSystemTimeZones();
|
||||||
|
// var timezonesPerPage = 20;
|
||||||
|
|
||||||
|
// await Context.Channel.SendPaginatedConfirmAsync(page + 1, (curPage) => new EmbedBuilder()
|
||||||
|
// .WithOkColor()
|
||||||
|
// .WithTitle("Available Timezones")
|
||||||
|
// .WithDescription(string.Join("\n", timezones.Skip((curPage - 1) * timezonesPerPage).Take(timezonesPerPage).Select(x => $"`{x.Id,-25}` UTC{x.BaseUtcOffset:hhmm}"))),
|
||||||
|
// timezones.Count / timezonesPerPage);
|
||||||
|
//}
|
||||||
|
|
||||||
|
//[NadekoCommand, Usage, Description, Aliases]
|
||||||
|
//[RequireContext(ContextType.Guild)]
|
||||||
|
//public async Task Timezone([Remainder] string id)
|
||||||
|
//{
|
||||||
|
// TimeZoneInfo tz;
|
||||||
|
// try
|
||||||
|
// {
|
||||||
|
// tz = TimeZoneInfo.FindSystemTimeZoneById(id);
|
||||||
|
// if (tz != null)
|
||||||
|
// await Context.Channel.SendConfirmAsync(tz.ToString()).ConfigureAwait(false);
|
||||||
|
// }
|
||||||
|
// catch (Exception ex)
|
||||||
|
// {
|
||||||
|
// tz = null;
|
||||||
|
// _log.Warn(ex);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if (tz == null)
|
||||||
|
// await Context.Channel.SendErrorAsync("Timezone not found. You should specify one of the timezones listed in the 'timezones' command.").ConfigureAwait(false);
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
54
src/NadekoBot/Resources/CommandStrings.Designer.cs
generated
54
src/NadekoBot/Resources/CommandStrings.Designer.cs
generated
@ -7754,6 +7754,60 @@ namespace NadekoBot.Resources {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to timezone.
|
||||||
|
/// </summary>
|
||||||
|
public static string timezone_cmd {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("timezone_cmd", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Sets this guilds timezone. This affects bot's time output in this server (logs, etc..).
|
||||||
|
/// </summary>
|
||||||
|
public static string timezone_desc {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("timezone_desc", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to `{0}timezone`.
|
||||||
|
/// </summary>
|
||||||
|
public static string timezone_usage {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("timezone_usage", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to timezones.
|
||||||
|
/// </summary>
|
||||||
|
public static string timezones_cmd {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("timezones_cmd", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to List of all timezones available on the system to be used with `{0}timezone`..
|
||||||
|
/// </summary>
|
||||||
|
public static string timezones_desc {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("timezones_desc", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to `{0}timezones`.
|
||||||
|
/// </summary>
|
||||||
|
public static string timezones_usage {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("timezones_usage", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to tl.
|
/// Looks up a localized string similar to tl.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -3087,4 +3087,22 @@
|
|||||||
<data name="tictactoe_usage" xml:space="preserve">
|
<data name="tictactoe_usage" xml:space="preserve">
|
||||||
<value>>ttt</value>
|
<value>>ttt</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="timezones_cmd" xml:space="preserve">
|
||||||
|
<value>timezones</value>
|
||||||
|
</data>
|
||||||
|
<data name="timezones_desc" xml:space="preserve">
|
||||||
|
<value>List of all timezones available on the system to be used with `{0}timezone`.</value>
|
||||||
|
</data>
|
||||||
|
<data name="timezones_usage" xml:space="preserve">
|
||||||
|
<value>`{0}timezones`</value>
|
||||||
|
</data>
|
||||||
|
<data name="timezone_cmd" xml:space="preserve">
|
||||||
|
<value>timezone</value>
|
||||||
|
</data>
|
||||||
|
<data name="timezone_desc" xml:space="preserve">
|
||||||
|
<value>Sets this guilds timezone. This affects bot's time output in this server (logs, etc..)</value>
|
||||||
|
</data>
|
||||||
|
<data name="timezone_usage" xml:space="preserve">
|
||||||
|
<value>`{0}timezone`</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
Loading…
Reference in New Issue
Block a user