Removed some obsolete commands and strings

This commit is contained in:
Kwoth
2021-12-23 20:58:39 +01:00
parent 856dcd048a
commit 594a3b1f97
10 changed files with 36 additions and 119 deletions

View File

@@ -1,45 +0,0 @@
using NadekoBot.Modules.Utility.Services;
namespace NadekoBot.Modules.Utility;
public partial class Utility
{
[Group]
public class PatreonCommands : NadekoSubmodule<PatreonRewardsService>
{
private readonly IBotCredentials _creds;
public PatreonCommands(IBotCredentials creds)
{
_creds = creds;
}
[NadekoCommand, Aliases]
[RequireContext(ContextType.DM)]
public async Task ClaimPatreonRewards()
{
if (string.IsNullOrWhiteSpace(_creds.Patreon.AccessToken))
{
Log.Warning("In order to use patreon reward commands, " +
"you need to specify CampaignId and AccessToken in creds.yml");
return;
}
if (DateTime.UtcNow.Day < 5)
{
await ReplyErrorLocalizedAsync(strs.clpa_too_early).ConfigureAwait(false);
return;
}
var rem = _service.Interval - (DateTime.UtcNow - _service.LastUpdate);
var helpcmd = Format.Code(Prefix + "donate");
await ctx.Channel.EmbedAsync(_eb.Create().WithOkColor()
.WithDescription(GetText(strs.clpa_obsolete))
.AddField(GetText(strs.clpa_fail_already_title), GetText(strs.clpa_fail_already))
.AddField(GetText(strs.clpa_fail_wait_title), GetText(strs.clpa_fail_wait))
.AddField(GetText(strs.clpa_fail_conn_title), GetText(strs.clpa_fail_conn))
.AddField(GetText(strs.clpa_fail_sup_title), GetText(strs.clpa_fail_sup(helpcmd)))
.WithFooter(GetText(strs.clpa_next_update(rem))));
}
}
}